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

Updation Error in Schedule line category using 'BAPI_SALESORDER_CHANGE'

HI ,

I am using BAPI_SALESORDER_CHANGE to Update schedule line category for an order.But the issue is...the entries are updated if it is having single schedule line item,but if more than on item it is giving error in Last Record.

15192625 000200 0001 2.608.596.065 130,000 21.09.2009 ZX CP

*15192625 000200 0002 2.608.596.065 0,000 04.02.2010 ZX CP

*EV1 335System error: Schedule line 0002 for item 000200 does not exist

EV4 219Sales document 0015192625 was not changed

i have written the code like below:

loop at i_ma4_etenr.

i_salesdocument = i_ma4_etenr-vbeln.

i_order_header_inx-updateflag = 'U'.

r_schedule_lines-itm_number = i_ma4_etenr-posnr.

r_schedule_lines-sched_line = i_ma4_etenr-etenr.

r_schedule_lines-sched_type = i__ma4_etenr-ettyp .

APPEND r_schedule_lines TO i_schedule_lines.

CLEAR : r_schedule_linesx.

r_schedule_linesx-itm_number = i_y16v_ma4_etenr-posnr.

r_schedule_linesx-sched_line = i_y16v_ma4_etenr-etenr.

r_schedule_linesx-updateflag = 'U'.

r_schedule_linesx-sched_type = 'X'.

APPEND r_schedule_linesx TO i_schedule_linesx.

endloop.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = i_salesdocument

order_header_inx = i_order_header_inx

TABLES

return = i_return

schedule_lines = i_schedule_lines

schedule_linesx = i_schedule_linesx.

Thanks in Advance,

Sateesh Kumar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2010 at 01:04 PM

    Hi Sateesh,

    I'm not clear if you are trying to insert or update.

    If you are inserting then set SCHEDULE_LINESX-updateflag = 'I' OR ' '. Since, you have given the flag as 'U', It is checking if already existing.

    Hope it helps.

    Sujay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2010 at 12:14 PM

    Hi,

    As you are facing error , so check wheather in VA02 schedule line fields have been uploaded or not initially.

    If they are not uploaded then you will be facing the error.

    Otherwise check:

    Did you pass the X fields for the schedule lines properly. As you are changing only the schedule lines, Just pass the SCHEDULE_LINES , SCHEDULE_LINESX Internal tables.

    Please also check whether anything is passed to ORDER_ITEM_INX- UPDATE field. it should be blank.

    May it helps you.

    Regards,

    DS.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2010 at 01:25 PM

    Hi,

    Have you resolved the issue. If you resolved can you please share it.

    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.