2014 Jun 04 9:04 AM
Hi,
Can you help me with this?
I have set parameter ID in user exit.
FREE MEMORY ID 'SGTXT'.
lv_sgtxt = 'TEST'.
SET PARAMETER ID 'SGTXT' FIELD lv_sgtxt.
In my smartforms
CLEAR gv_text.
GET PARAMETER ID 'SGTXT' FIELD gv_text.
the problem is after get parameter id, i didn't get any data.
Thanks.
Regards,
JB
2014 Jun 04 9:49 AM
Sir,
Did u Declared same Internal Table in both User Exit and Smartforms?.
Can you send your userExit name(which t-code you are using For ).
Regards,
Venkatramesh.V
2014 Jun 04 9:09 AM
2014 Jun 04 9:09 AM
are the fields typed the same?
Can you check in the debugger of the Smartform initialisation routine - look at the global PIDs and see if they are set
Also, follow up previous suggestion - how is the form printed - in background or foreground?
2014 Jun 04 9:10 AM
Hello JB,
In this case you need to use export and import keywords.
EXPORT lv_sgtext to memory id ''SGTXT'..
in your smartform
IMPORT lv_sgtext FROM memory id ''SGTXT'..
GET/SET parameter id syntax will only work when a parameter id is assiged to a data element.
Example
Thanks
2014 Jun 04 9:20 AM
Hi All,
the form is run in foreground.
same data types.
I also used EXPORT/IMPORT but still not working.
2014 Jun 04 9:25 AM
Hello JB ,
Kindly share your code for export and import statement.
Thanks
2014 Jun 04 9:33 AM
Hi,
here is my code
DATA; lv_sgtxt type mseg-sgtxt.
EXPORT lv_sgtxt TO MEMORY ID 'SGTXT'. "user exit
IMPORT lv_sgtxt FROM MEMORY ID 'SGTXT'. "smartforms
2014 Jun 04 9:35 AM
Sir,
Export/Import Syntex.
Data: begin of itab,
vbeln type vbap-vbeln,
end of itab.
EXPORT ITAB TO MEMORY ID 'ITAB'.
IMPORT ITAB TO ITAB FROM MEMORY ID 'ITAB'.
Regards,
Venkat
2014 Jun 04 9:40 AM
2014 Jun 04 9:45 AM
Hello JB.
Please follow below approach to findout if SGTXT is exported to ABAP memory.
1. Set break-point before Export and Import statements.
2. Follow below navigation to see if SGTXT is exported to memory in debugging mode after EXPORT statement
GOTO->SYSTEM AREAS->ABAP Memory(classical debugger)
3.Follow the same steps after IMPORT statement to see if same memory id is available in ABAP memory.
THanks
2014 Jun 04 10:09 AM
Hi,
Have you checked wheather the smartform is called after the user exit,
once place Break-point in both exit and smartform and check the smartform is called after exit or not.
And where u r importing your lv_sgtxt in smartform.
Regards,
Pavan
2014 Jun 04 9:49 AM
Sir,
Did u Declared same Internal Table in both User Exit and Smartforms?.
Can you send your userExit name(which t-code you are using For ).
Regards,
Venkatramesh.V
2014 Jun 04 9:56 AM
EXIT name: EXIT_SAPMM07M_001
I did not declare internal table, i only need to get the value of e_sgtxt. i'm using this in MIGO
2014 Jun 04 10:10 AM
Hello JB,
I assume that you are trying to import from memory in update task.
Please use below statements
EXPORT lv_sgtxt TO SHARED MEMORY indx(xx) ID 'SGTXT'.
IMPORT lv_sgtxt FROM SHARED MEMORY indx(xx) ID 'SGTXT'.
Thanks
2014 Jun 04 10:17 AM
Thanks for your help. This is correct, Can you please explain this to me?
2014 Jun 04 10:03 AM
Hi Jb
Are you sure your parameter id is correct?
i did not find it in TPARA table, so just try other id.
regards,
Archer
2014 Jun 04 10:04 AM
see in debug mode how many times the user exixt get triggers.. The memory might have get cleared.
Please chcek if you have used same variables in exixt as well as in your smartforms.
2014 Jun 04 10:13 AM
Hi JB,
*************************************your code**************************
here is my code
DATA; lv_sgtxt type mseg-sgtxt.
EXPORT lv_sgtxt TO MEMORY ID 'SGTXT'. "user exit
IMPORT lv_sgtxt FROM MEMORY ID 'SGTXT'. "smartforms
*****************************************************************************
Replace this with
DATA: lv_sgtxt type mseg-sgtxt,
lv_sgtxt2 type mseg-sgtxt.
EXPORT lv_sgtxt TO MEMORY ID 'SGTXT'. "user exit
IMPORT lv_sgtxt TO lv_sgtxt2 FROM MEMORY ID 'SGTXT'. "smartforms
2014 Jun 04 10:23 AM
JB - this should work if both parameters are typed the same, but you must check in the debug as mentioned before. Some transactions I have come across reset the PIDS internally (I don't think that is the case here but I am just adding a log to the fire of reasons why it may NOT work in some instances)
There is some alternatives to this approach...why not try using a static class attribute to retain the value? Create a utility class and create an sgtxt attribute and assign it there in user exit and read back in the smartform.
2014 Jun 05 10:33 AM