Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to Modify VBEP-CMENG using SD_SALESDOCUMENT_CHANGE

Former Member
0 Kudos

Hi Friends,

We are facing problem while using SD_SALESDOCUMENT_CHANGE Function Module.

Our requirement is we need to modify the Rounded Qty through Z report for specific Sales order Schedule lines.

When we try to use the above function module and pass quantity in table SCHEDULE_EX - CORR_QTY, it is not working.

Below are the addition Parameters passed to these table.

      ls_schedule_ex-operation  = '004'.
       ls_schedule_ex-doc_number = g_it_data-vbeln.
       ls_schedule_ex-itm_number = g_it_data-posnr.
       ls_schedule_ex-sched_line = g_it_data-etenr.
       ls_schedule_ex-corr_qty   = ls_schedule-req_qty.
       APPEND ls_schedule_ex.


Note : Checked through debugging, as soon as the function module is called , SCHEDULE_EX table is refreshed and cleared.

7 REPLIES 7

thanga_prakash
Active Contributor
0 Kudos

Hello Moorthy,

To which table or parameter you are passing ls_schedule_ex.

In case of tables, did you fill the corresponding check bar table with the Update flag and X in the corresponding field which you want to update the values.

Regards,

Thanga

0 Kudos

The values are passed to  SCHEDULE_EX   table of FM. Update flag is set in order_header_inx , still it is not working.

thanga_prakash
Active Contributor
0 Kudos

read the documentation of the function module, it is given clearly.

thanga_prakash
Active Contributor
0 Kudos

SCHEDULE_EX table is refreshed and cleared before the function module call or after the function module call??

thanga_prakash
Active Contributor
0 Kudos

Did you pass the below EXPORTING parameters.


CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE'

          EXPORTING

            salesdocument              = <fs_atp>-vbeln

            order_header_in            = gs_order_header_in

            order_header_inx           = gs_order_header_inx

            simulation                 = ' '

            business_object            = 'BUS2032'

            call_from_bapi             = ct_charx

          IMPORTING

            sales_header_out           = gs_sales_header_out

          TABLES

            return                     = gt_return

            item_in                    = gt_item_in

            item_inx                   = gt_item_inx

            schedule_in                = gt_schedule_in

            schedule_inx               = gt_schedule_inx

            items_ex                   = gt_items_ex

            schedule_ex                = gt_schedule_ex.

Regards,

TP

0 Kudos

Hello Thanga,

Please check Values passed in table schedule_ex is updated in respective sales order.

We are trying to update Rounded Qty in Sales order Schedule Lines using schedule_ex-corr_qty.


Please check in your code by passing this value for update and let us know if it working.


Thanks,


Moorthy.K

0 Kudos

Dear all,

I have exactly the same problem.

Built all tables and structures as described above but the rounded quantity is not changed after the function call.

Any idea?

Thanks.

Kind regards

Frank