Skip to Content
author's profile photo Former Member
Former Member

How to make the field VBEP-LIFSP = Y2' whenever sales order is created.

Hi All,

When ever sales order is created i need to make VBEP-LIFSP = Y2'

I got the include and exit name but my code is not working.

Please tell me the logic for the same.

Thanks,

Jyothi.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 20, 2014 at 12:39 PM

    Which is the code you wrote? Which include and form are you implementing?

    ----EDIT my 1st try will be this----

    Form USEREXIT_SAVEDOCUMENT

    FIELD-SYMBOLS: <f_vbep> LIKE LINE OF xvbep.

    LOOP AT xvbep ASSIGNING <f_vbep> WHERE updkz = 'I' . "only when i insert a new sched. line.

    <f_vbep>-lifsp = 'Y2'.

    ENDLOOP:

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 22, 2019 at 11:42 PM

    Hello, I have a pricing condition by level called ZA01.

    My request is: if ZA01 is different to 0 In the schedule line I must put one Z delivery block.

    I'll try with this code in user exit

    USEREXIT_SAVE_DOCUMENT

    IF sy-ucomm = 'SICH'.


    CASE sy-tcode.

    WHEN 'VA01' or 'VA02'.

    loop at xvbep ASSIGNING <f_vbep>.
    read table xkomv with key kPOSN = <f_vbep>-POSNR KSCHL = 'ZA01'.
    if sy-subrc = 0.
    IF xkomv-kwert <> 0.
    <f_vbep>-lifsp = 'Z1'.
    IF sy-tcode = 'VA02'.
    <f_vbep>-updkz = updkz_update.
    ENDIF.
    ELSE.
    <f_vbep>-lifsp = SPACE.
    IF sy-tcode = 'VA02'.
    <f_vbep>-updkz = updkz_update.
    ENDIF.
    endif.
    ENDLOOP.
    * endif.
    WHEN OTHERS.
    EXIT.
    ENDCASE.


    endif.
    ENDIF.

    When I made debug appear xvbep with the change but after when check the SO delivery block is in blank.

    Thanks

    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.