Skip to Content
0
Former Member
Jul 26, 2010 at 08:46 PM

Modify a value of a field in dynpro, from a User-Exit

827 Views

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.