‎2008 Jul 23 10:22 AM
hi,
how to get screen field value i.e ebeln value from ME22N to zprogram.kindly help regarding this issue.
thanks and regards,
siri
‎2008 Jul 23 10:25 AM
Hi,
Check this thread:
http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/db9e0435c111d1829f0000e829fbfe/content.htm
Regards
Adil
‎2008 Jul 23 10:25 AM
‎2008 Jul 23 10:25 AM
‎2008 Jul 23 10:26 AM
You can use the get parameter ID for that.
The parameter ID for EBELN is BES. this you can find out by pressing F1 on the field and going to technical info.
In the Zprogram try including the following code, to get the value of EBELN in ME22N.
Data: w_ebeln type ekko-ebeln.
constants: c_parameter_id_bes TYPE memoryid VALUE 'BES'
GET parameter ID c_parameter_id_bes FIELD w_ebeln.
‎2008 Jul 23 10:35 AM
Use code like this to get value from selection screen of other transaction.
get parameter id 'BES' field itab-ebeln.
get parameter id 'BSP' field itab-ebelp.
Call transaction 'ME22N;.
Regards
rajesh
‎2008 Jul 23 10:58 AM
hi,
ive tried using your code but even it didnt work.kindly help me.
thanks and regards,
siri
‎2008 Jul 23 11:23 AM
The code works perfectly. It reads the current value from SAP memory into the variable in the program. Maybe the memory area is empty.
Say, you have just entered a PO 4500006371 in ME22N in your system, that PO number gets stored in the SAP memory and by using GET parameter ID you can read that value into program.
Enter a PO number in ME22N and then go to the program having GET parameter ID. after the GET parameter statement put a write statement
like this.
write: w_ebeln.
It will surely print the PO number that you had entered recently. Thats how GET parameter ID works.
‎2008 Jul 23 10:30 AM
Hi Sirisha,
The screen field values are populated at run time only.
Once the transaction is saved, the data is refreshed from the structures or screen fields. At run time or at the time of execution of the transaction we need to capture the screen fields.
The screen field name is MEPO_TOPLINE - EBELN.
Here MEPO_TOPLINE is the structure name.
You can use the Parameter ID and get the value. The parameter ID for EBELN is ' BES '
Best regards,
raam