Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reg. Smartform function calling in script

Dear Experts

I create one smartform and I would like to call it in my script. how to implement this. Pls help.

my smartform name : ZDEMO_LOOP

Function module name : /1BCDWB/SF00000091

My scrip is :

Report ZPR.

TABLES:mara,makt.

DATA:BEGIN OF pr OCCURS 0,

matnr LIKE mara-matnr,

ersda LIKE mara-ersda,

ernam LIKE mara-ernam,

laeda LIKE mara-laeda,

aenam LIKE mara-aenam,

lvorm LIKE mara-lvorm,

END OF pr.

DATA:pr1 LIKE pr OCCURS 0 WITH HEADER LINE.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

SELECT-OPTIONS:mat FOR mara-matnr.

SELECTION-SCREEN END OF BLOCK b1.

SELECT maramatnr maraersda maraernam maralaeda mara~aenam

mara~lvorm INTO TABLE pr1 FROM mara

WHERE mara~matnr IN mat.

write :/'Material',

'Material Desc'.

LOOP AT pr1.

WRITE:/ pr1-matnr,

pr1-ersda,

pr1-ernam,

pr1-laeda,

pr1-aenam,

pr1-lvorm.

ENDLOOP.

That is I want the output in smart form that required data from table.

Thanks

Rajakumar.K

Tags:
Not what you were looking for? View more on this topic or Ask a question