Welcome To My BLOG

This site is to give a brief idea for the abap learners who are looking for some real time programs .It consists of collection of programs from my side . I hope these programs are very much used for all of the learners. Please check the links for any information in ABAP.
Please vote for my Blog. And please input me on this mail addrssess.Email me

Share this link with your friends

http://www.rebtel.com/u/15163104576

For every friend who signs up using this link and makes a payment, we'll give you 8 €!


Wednesday, September 22, 2010

Dynamic declaration depending on condition

REPORT zdynamic.

TYPES:

p3 TYPE p DECIMALS 3,

p2 TYPE p DECIMALS 2.

DATA:

dref TYPE REF TO data.

FIELD-SYMBOLS TYPE ANY.

PARAMETERS a TYPE i.

IF a = 1.

CREATE DATA dref TYPE p3.

ELSE.

CREATE DATA dref TYPE p2.

ENDIF.

ASSIGN dref TO .

No comments: