abapsap-erp

How to make a batch input in FB02 by updating the xref2 field


I would like an example of how to make a batch input in FB02 transaction code by updating the xref2 field?

I tried updating the table directly in the table BKPF.

I need example how make with this change specific field

You could help me have a solution for this.

Thanks for your help.


Solution

  • You can get batch input codes via SAP GUI. Go to System > Service > Batch input > Recorder and start new recording.

    Program Scr SID Field name Field value
    T FB02
    SAPMF05L 0100 X
    BDC_CURSOR RF05L-BELNR
    BDC_OKCODE =WEITE
    RF05L-BELNR 5000000001
    RF05L-BUKRS 1000
    RF05L-GJAHR 2024
    SAPMF05L 0700 X
    BDC_CURSOR BKPF-BELNR
    BDC_OKCODE =VK
    SAPMF05L 1710 X
    BDC_CURSOR BKPF-XREF2_HD
    BDC_OKCODE =ENTR
    BKPF-XBLNR FI1
    BKPF-XREF1_HD XREF1
    BKPF-XREF2_HD XREF2
    SAPMF05L 0700 X
    BDC_CURSOR BKPF-BELNR
    BDC_OKCODE =AE