07-26-2010 9:46 PM
Hi guys, i have a problem and i wish you can help me.
In transaction IW32, I am using EXIT_SAPLCOIH_002 to generate a stock transfer order with BAPI_PO_CREATE1. Once this bapi is used, it gives me the number of the document created.
I need to put this number in the field PMSDO-BSTKD (Customer purchase order number) of the dynpro.
First, i tried to modify directly the database (from table pmsdo), but naturally, the dynpro is not updated and when i save the document, it overwrites with a blank value.
Then I tried to use a field symbol directly to the variable of the program of the dynpro, like this:
FIELD-SYMBOLS: <rv_bstkd> TYPE pmsdo-bstkd.
ASSIGN ('(SAPLCOI3)PMSDO-BSTKD') TO <rv_bstkd>.
<rv_bstkd> = ls_return-message_v2.
But its has no effect in the screen.
Lastly, i tried to use two FM C14Z_DYNP_WRITE_FIELD and C14Z_DYNP_READ_FIELD
With the "READ" one, I can read the value on the screen. Then with the "WRITE" one, i can write a new value. (that i can, once again, read it, with the new value!). But when I exit the user exit and return to view the screen, the field is still in blank (or with the previous value).
Any, Ideas? I would be grateful for any suggestions.
Thanks in advance.
07-27-2010 11:09 AM
Hi Jguerra,
Please try FM 'IQS1_FILL_WA_FROM_BUFFER'.
Please see a sample code, am not sure about it, but i just give a try.
data: Lv_VIQMEL like VIQMEL.
CALL FUNCTION 'IQS1_FILL_WA_FROM_BUFFER'
EXPORTING
I_QMNUM = CAUFVD_IMP-QMNUM
I_AKTYP = 'V'
IMPORTING
E_VIQMEL = Lv_VIQMEL
EXCEPTIONS
NUMBER_INITIAL = 1
OTHERS = 2.
check sy-subrc = 0.
if Lv_VIQMEL-MSAUS is initial.
move 'X' to NO_RELEASE.
endif.
Regards,
Antony Thomas
07-27-2010 1:21 PM
Thanks for the answer.
I tried it, i dont know what it does, but seems that doesn't work or something (it gives me a big dump when it tries to load screen 300).
I hear more suggestions!
07-27-2010 1:38 PM
Hi,
See aforementioned FM contains almost all tables related to these tcodes.
Dont copy the same code there, instead identify which interface parameter/ table parameter of this FM u need to use and call this FM accordingly.Still am not sure about the result.
Normally for such issues, there will be another exit, where you have to make the update indicator X, so please check with other exit FMs from the same function group( i think Xwo1)
hopes the best
Regards,
Antony Thomas
07-27-2010 8:01 PM
Check whether any badi is available where you can set the screen fileds, i mean for example methods related to PBO or PAI.
07-29-2010 3:41 PM
Hi,
You can try the FM 'DYNP_VALUES_UPDATE'.
Thanks and Regards
Pradipta Kumar Mishra