Skip to Content

Specific field to update in BKPF coming from VBRK

How to do that ? Which exit ?

Thanks a lot.

Fonctionnel OSS

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 09:21 AM

    Hi

    U can find the bill number in field BKPF-AWKEY, in this case the field BKPF-AWTYP = 'VBRK'.

    U should have a standard index for BKPF in order to select the account document created by a particular operation (in your case the billing).

    The bill number often is placed in the reference BKPF-XBLNR.

    So if you need to find out the account document:

    SELECT * FROM BKPF WHERE AWTYP = 'VBRK'
                                              AND AWKEY = VBRK-VBELN.
      EXIT.
    ENDSELECT.

    If you need to transfer some information from bill to invoice you can use the exit of the billing EXIT_SAPLV60B_001.

    U can also see the exits: EXIT_SAPLV60B_00*

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2007 at 09:24 AM

    Hi,

    try like this

    &----


    *& Form SUB_READ_UPDATE_BSEG

    &----


    • text

    ----


    FORM sub_read_update_bseg.

    IF NOT it_final[] IS INITIAL.

    LOOP AT it_final INTO wa_final.

    UPDATE bseg SET zuonr = wa_final-ccnum

    WHERE bukrs EQ wa_final-bukrs

    AND belnr EQ wa_final-vbeln

    AND rfzei EQ wa_final-rfzei

    AND saknr NE ' '.

    ENDLOOP.

    *--Message data updated successfully

    MESSAGE i888 WITH text-002.

    LEAVE LIST-PROCESSING.

    ELSE.

    *--Message No data found

    MESSAGE i888 WITH text-003.

    LEAVE LIST-PROCESSING.

    ENDIF.

    ENDFORM. " SUB_READ_UPDATE_BSEG

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.