2007 Sep 06 5:34 AM
Could someone please let me know the functionality of the Function Module SD_SALES_SCHEDULE_MAINTAIN.
I am using the BAPI, BAPI_SALESORDER_CHANGE to change the delivery block for a line item. But in SAP, we find some sales order for which the delivery block (VBEP-LIFSP) is input disabled, in which case the BAPI fails and the FM SD_SALES_SCHEDULE_MAINTAIN would be used. I would want to know why is this FM used and how exactly does this FM work?
Thanks,
Vijay
Could someone please let me know the functionality of the Function Module SD_SALES_SCHEDULE_MAINTAIN.
I am using the BAPI, BAPI_SALESORDER_CHANGE to change the delivery block for a line item. But in SAP, we find some sales order for which the delivery block (VBEP-LIFSP) is input disabled, in which case the BAPI fails and the FM SD_SALES_SCHEDULE_MAINTAIN would be used. I would want to know why is this FM used and how exactly does this FM work?
Thanks,
Vijay
2007 Sep 06 8:41 AM
SD_SALES_SCHEDULE_LINE_READ and SD_SALES_SCHEDULE_MAINTAIN are meanst for SD Doc -Copy functionality.
This is the syntax for maintaining Schedule lines -
CALL FUNCTION 'SD_SALES_SCHEDULE_MAINTAIN'
EXPORTING
FVBEPKOM = VBEPKOM
EXCEPTIONS
ERROR_MESSAGE = 01.Calling this function module can Update Schedule lines of the SD Doc.
2007 Sep 06 8:56 AM
SD_SALES_SCHEDULE_MAINTAIN is for Change availability check / schedule lines in sales orders.
Example:
**********
***
LOOP AT xvbep.
CLEAR : lt_header_x , lt_return , lt_return[] ,
schedules_in , schedules_in[] ,
schedules_inx, schedules_inx[] .
lt_header_x-updateflag = 'U'.
schedules_in-itm_number = xvbep-posnr.
schedules_in-sched_line = xvbep-etenr.
schedules_in-REQ_DLV_BL = '20'.
APPEND schedules_in.
schedules_inx-itm_number = xvbep-posnr.
schedules_inx-sched_line = xvbep-etenr.
schedules_inx-updateflag = 'U'.
schedules_inx-REQ_DLV_BL = 'X'.
APPEND schedules_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = xvbep-vbeln
order_header_inx = lt_header_x
TABLES
schedule_lines = schedules_in
schedule_linesx = schedules_inx
return = lt_return.
APPEND LINES OF lt_return TO gt_return.
LOOP AT lt_return WHERE type EQ 'E'
OR type EQ 'A'.
EXIT.
ENDLOOP.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
endloop.
regards,
srinivas
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |