1. 程式人生 > >建立銷售訂單BAPI一些心得

建立銷售訂單BAPI一些心得

 LS_BAPIPAREX-STRUCTURE 'BAPE_VBAK'.

    LS_BAPE_VBAK-TRATY   LS_BAPISDHD1_VBKD-TRATY.
    LS_BAPE_VBAK-VSART   LS_BAPISDHD1_VBKD-VSART.
    LS_BAPE_VBAK-TRMTYP  LS_BAPISDHD1_VBKD-TRMTYP.
    LS_BAPE_VBAK-SDABW   LS_BAPISDHD1_VBKD-SDABW.

    LS_BAPIPAREX-VALUEPART1 LS_BAPE_VBAK.

    APPEND 
LS_BAPIPAREX TO ET_BAPIPAREX.

    LS_BAPIPAREX-STRUCTURE 'BAPE_VBAKX'.
    LS_BAPE_VBAKX-TRATY    CNS_X.
    LS_BAPE_VBAKX-VSART    CNS_X.
    LS_BAPE_VBAKX-TRMTYP   CNS_X.
    LS_BAPE_VBAKX-SDABW    CNS_X.

    LS_BAPIPAREX-VALUEPART1 LS_BAPE_VBAKX.