2009 Jan 19 9:18 AM
Hi experts,
I have a problem with the PAI. I debugged the program. It goes into modul m_modify. The value of the field1 is 2. I clear it and give the value 1. It is working fine, that's what I want. But after the program finishes the modul the value of the field becomes 2 again.
I don't know how could it happen if I previously cleared and gave a value to this field.
Here is my piece of code:
PROCESS AFTER INPUT.
FIELD v_modid MODULE m_modify ON REQUEST.
....
In the module I use the following commands:
clear: field1.
field1 = '1'.
2009 Jan 19 9:28 AM
Hi,
I think in PBO you are setting the field value to 2 somewhere.
Because after PAI executes, it will execute the PBO again.
Thanks,
Srilakshmi.
2009 Jan 19 9:28 AM
Hi,
I think in PBO you are setting the field value to 2 somewhere.
Because after PAI executes, it will execute the PBO again.
Thanks,
Srilakshmi.
2009 Jan 19 9:35 AM
No, it's not the case. The value changes back in the PAI module, right after it comes back from m_modify modul.
2009 Jan 19 9:38 AM
2009 Jan 19 10:43 AM
Change your coding like this:
PROCESS AFTER INPUT.
FIELD field1.
FIELD v_modid MODULE m_modify ON REQUEST.Regards,
Karsten
2009 Jan 19 10:59 AM
Thank you very much!! It solved the problem. Could you explain it how it works?
2009 Jan 19 11:16 AM
In your module m_modify you change the value of field1 to '1', but for some reason
this abap field is set to the value of the screen field at a later point of time, it is
set back to '2' (I have to see the rest of your code to tell why).
By calling "FIELD field1" at first, you make sure that the transport of the screen field
to the abap field is done before your field value modification.
For more information about "Controlling the Data Transfer" you can check the
abap documentation [here|http://help.sap.com/saphelp_46c/helpdata/en/9f/dbabb035c111d1829f0000e829fbfe/frameset.htm].
Great I could help,
Karsten
2009 Jan 19 12:21 PM
2009 Jan 19 12:21 PM