11-02-2008 8:53 AM
Hi All,
Am working on an enhancement move_field_to_likp for inbound delivery where i need to display customer(kunnr) in the inbound delivery vl33n ..
Am passing kunnr which is selected from yypa table to likp-kunnr,,but its not displaying in the vl33n..
the path am using for displaying the selected kunnr in vl33n is ..goto->header->partner..after going to this path the customer wat i've selected should be displayed.
i have also tried passing yypa-kunnr to vbpa-kunnr,,but its still not displaying in vl33n.
Any solution to get rid off from this?? Pls.
Regards,
John
11-02-2008 10:16 PM
Hi John,
SAP uses two internal tables to manage updates.
XVBPA - after image of partner changes
YVBPA - before image of partners
Hence coming to your problem you should do something like this.
Build new entry or modify existing one
LS_PARTNER-VBELN = ...
LS_PARTNER-POSNR = ...
LS_PARTNER-PARVW = ...
...
LOOP AT XVBPA INTO LS_XVBPA
WHERE VBELN EQ LS_PARTNER-VBELN
AND POSNR EQ LS_PARTNER-POSNR
AND PARVW EQ LS_PARTNER-PARVW
AND UPDKZ NE CHARD.
LF_TABIX = SY-TABIX.
ENDLOOP.
Entry with same key exists already
IF SY-SUBRC EQ 0.
IF LS_XVBPA-UPDKZ = ' ' AND T180-TRTYP EQ CHARV.
Save original version of LS_XVBPA to YVBPA
LS_YVBPA = LS_XVBPA.
APPEND LS_YVBPA TO YVBPA.
LS_XVBPA-UPDKZ = CHARU.
ENDIF.
Transfer changes back to table XVBPA
MOVE-CORRESPONDING LS_PARTNER TO LS_XVBPA.
MODIFY XVBPA FROM LS_XVBPA INDEX LF_TABIX.
ELSE. "New entry must be created
MOVE-CORRESPONDING LS_PARTNER TO LS_XVBPA.
LS_XVBPA-UPDKZ = CHARI.
APPEND LS_XVBPA TO XVBPA.
ENDIF.
11-03-2008 4:57 PM