Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass module pool program screen field values to a zprogram

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

Is the module pool screen called in the zprogram? Please clarify

madhu_vadlamani
Active Contributor
0 Kudos

Hi Syed,

It is not clear.Can you explain more.

Regards,

Madhu.

phillip_manning2
Explorer
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Define a data variable of the same name in the zprogram.