04-02-2012 2:41 PM
how to pass module pool program screen field values to a zprogram
Moderator message: please search for available information before posting, provide much more details when posting.
Message was edited by: Thomas Zloch
04-02-2012 3:29 PM
04-04-2012 4:01 AM
04-04-2012 4:06 AM
Hi,
You can assign the value by prefixing the variable name with the module pool name. For example:
ASSIGN ('(SAPFP50M)Q0008-ANSAL') TO <FIELD_SYMBOL>.
You can check this assignment will work by pasting the above variable (without the outer brackets and quotes) into the variable explorer in the debugger at the point you wish to use it.
Cheers,
Phil
04-04-2012 5:41 AM
You might have created a program in se38 which is of type "Module Pool" and also create screen in SE51 for the same program. So the names which you have given to the fields in SE51 layout, give the same name and data type in se38 program. Data will automatically will be passed frm screen to progarm.
As you know Module pool program has 2 main events PBO and PAI. This events also have
"MODULE XXXX" which contains logic to be executed when PBO or PAI are triggered. So when PBO or PAI is executed the data is exchanged between screen(se51) Program(se38).
Hope it helps you...
Thanks & Regards
Mihir
04-04-2012 6:10 AM
Dear syed,
first you need to create program in se38 with Module pool type insted of Executable type because executable type is for reports.After you need to declare Structure with required filed As like below
types:begin of ty_test,
vbeln type vbeln,
posnr type posnr,
end of ty_test.
data:it_test type standard table of ty_test,
wa_test type ty_test."work area
after you need to devlop screen using se51 Transaction Code and you need to declare input/output filed with same workarea(wa_test-vbeln) of above declared program
*****and Main Imprtent point is in both Tcode(se38,se51) Program name should be same.
Regards,
Siva rama krishna mohan G
Message was edited by: siva rama
Message was edited by: siva rama
04-04-2012 6:14 AM