2014 Dec 08 11:16 AM
TYPES: BEGIN OF TY_KSCHL,
SIGN(1) TYPE C,
OPTION(2) TYPE C,
LOW TYPE KSCHL,
HIGH TYPE KSCHL,
END OF TY_KSCHL.
hi i have declared like this in smartforms
WA_KSCHL-SIGN = 'I'.
WA_KSCHL-OPTION = 'EQ'.
WA_KSCHL-LOW = 'PB00'.
APPEND WA_KSCHL TO IT_KSCHL.
mentioned in smartforms shall i do like this i have did only the hardcoded is it possible here
With thanks ,
Maha.
2014 Dec 08 11:26 AM
Hi Mahalakshmi,
Can you please elaborate why you need range declaration? What is your actual requirement?
2014 Dec 08 11:40 AM
hi archana ,
i want to hardcode using this Range . It requires for my program so i am just trying to use this one in smartforms is it possible to use there . I have declared like this one
1. In types column i mentioned this one.
BEGIN OF TY_KSCHL,
SIGN(1) TYPE C,
OPTION(2) TYPE C,
LOW TYPE KSCHL,
HIGH TYPE KSCHL,
END OF TY_KSCHL.
2. In global data i have created a table for this one
it_kschl type table of ty_kschl,
wa_kschl type ty_kschl.
3. in initialization am using this
WA_KSCHL-SIGN = 'I'.
WA_KSCHL-OPTION = 'EQ'.
WA_KSCHL-LOW = 'PB00'.
APPEND WA_KSCHL TO IT_KSCHL.
WA_KSCHL-LOW = 'PBXX'.
APPEND WA_KSCHL TO IT_KSCHL.
i will use this one in select statement is it possible to do like this in smartforms
WIth thaks,
Maha
2014 Dec 08 11:51 AM
Hi Mahalakshmi,
its possible and pass the ranges in where condition of the select statement and get the data. write this logic in program lines node or initialization.
Thanks,
Sree
2014 Dec 08 11:56 AM
Hi Mahalakshmi,
Yes, it is possible to declare range. But, in this case you will need to fetch your data in your smartform itself. It is good practice to fetch your data in print program and then pass that data to smartform.
2014 Dec 08 11:59 AM
hi sreedevi i just tried it
it showing error like this : Field "WA_KSCHL-SIGN" is unknown
It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement
thanks ,
Maha
2014 Dec 08 12:01 PM
You need to define work area in global data:
WA_KSCHL type ty_kschl.
2014 Dec 08 12:03 PM
Hi mahalakshmi,
declare like below.
data: it_kschl type table of ty_kschl,
wa_kschl type ty_kschl.
dont use global data.
Thanks,
Sree
2014 Dec 08 12:14 PM
hi sreedevi :
THanks it works . Having one more doubt that is when u declare internal table u have to specify in types colum as well as initialization both needed or any one itself k
Regards ,
Maha
2014 Dec 08 12:19 PM
You have to provide the name of internal table in Input parameters in Initialization.
2014 Dec 08 12:25 PM
Hi Mahalakshmi,
I Think here you are missing to define the work area and internal table in input parameter tab.
Please follow the below screen shot.
And one more thing it will work for both(Defining range declaration locally or globally ).
2014 Dec 08 12:29 PM
2014 Dec 09 4:54 AM