Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Update Zfield information on Devlivery header

$
0
0

Hi,

 

Does anyone please suggest  how to use BAPI_OUTB_DELIVERY_CHANGE with the extension fields populated. I used below code but no updates happening on custom field  in Delivery header table (LIKP).

 

 

 

data : ls_ext1 type BAPIEXTC,
        lt_ext1 type table of BAPIEXTC,
        ls_ext2 type BAPIEXT,
        lt_ext2 type table of BAPIEXT,
        header type BAPIOBDLVHDRCHG,
        HEADER_CONTROL type BAPIOBDLVHDRCTRLCHG,
        return type table of BAPIRET2.

  refresh : lt_ext1,lt_ext2.


        header-DELIV_NUMB = likp-vbeln.
        HEADER_CONTROL-DELIV_NUMB = likp-vbeln.

        ls_ext1-FIELD1 = 'ZZCARRIER'.
        append ls_ext1 to lt_ext1.


        ls_ext2-param     = 'LIKP'.
*       ls_ext2-row       = wa_lips-posnr.
        ls_ext2-field     = 'ZZCARRIER'.           "Z FIELD 2
        ls_ext2-value     = carriertype.
        ls_ext2-type = 'CHAR'.
        ls_ext2-length = '30'.
        append ls_ext2 to lt_ext2.


call function 'BAPI_OUTB_DELIVERY_CHANGE'
   exporting
     HEADER_DATA                   header
     HEADER_CONTROL                = HEADER_CONTROL
     DELIVERY                      = likp-vbeln
   tables
    EXTENSION1                    = lt_ext1
    EXTENSION2                    = lt_ext2
     RETURN                        = return
           .
call function 'BAPI_TRANSACTION_COMMIT'
           .

 

 

Thanks,

Ashok.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>