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

How to mass update process order


I want to mass update process order scheduling, update fields include basis start data/time , basis finish data/time and scheduling type

I tried FM but the test result shows it can only update sheduleing type sssessfully, the data and time part failed.

how can I update data /time and scheduling type all sccuessfully?

Part of My code:

LOOP AT it_record INTO wa_record.
CLEAR:l_sched_type,l_fwd_dlv_date,l_fwd_dlv_time,l_fwd_beg_date,
l_fwd_beg_time, wa_return.
REFRESH:i_detail_return,i_orders,i_application_log.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_record-aufnr
IMPORTING
output = wa_record-aufnr.

CASE lb_type.
WHEN '1'.
l_fwd_beg_date = wa_record-gstrp. "Basic start date

l_fwd_dlv_date = wa_record-gltrp. "Basic finish date

WHEN '2'.
l_fwd_beg_date = wa_record-gstrp. "Basic start date

l_fwd_dlv_date = wa_record-gltrp. "Basic finish date

WHEN '3'.
l_fwd_beg_date = wa_record-gstrp. "Basic start date

l_fwd_dlv_date = wa_record-gltrp. "Basic finish date
WHEN '4'.
l_fwd_beg_date = wa_record-gstrp. "Basic start date

l_fwd_dlv_date = wa_record-gltrp. "Basic finish date
WHEN '5'.
l_fwd_beg_date = wa_record-gstrp. "Basic start date
l_fwd_beg_time = wa_record-gsuzp."Basic start time
l_fwd_dlv_date = wa_record-gltrp. "Basic finish date
l_fwd_dlv_time = wa_record-gluzp."Basic finish (time)

WHEN '6'.
l_fwd_beg_date = wa_record-gstrp. "Basic start date
l_fwd_beg_time = wa_record-gsuzp."Basic start time
l_fwd_dlv_date = wa_record-gltrp. "Basic finish date
l_fwd_dlv_time = wa_record-gluzp."Basic finish (time)


ENDCASE.
l_sched_type = lb_type.
w_orders-order_number = wa_record-aufnr.
APPEND w_orders TO i_orders.
CALL FUNCTION 'BAPI_PROCORD_SCHEDULE'
EXPORTING
sched_type = l_sched_type
* FWD_DLV_ORIGIN =
fwd_dlv_date = l_fwd_dlv_date
fwd_dlv_time = l_fwd_dlv_time
* FWD_DLV_OFFSET =
* FWD_DLV_UNIT =
* FWD_BEG_ORIGIN =
* FWD_BEG_DATE =
* FWD_BEG_TIME =
* FWD_BEG_OFFSET =
* FWD_BEG_UNIT =
* BCK_DLV_ORIGIN =
* BCK_DLV_DATE =
* BCK_DLV_TIME =
* BCK_DLV_OFFSET =
* BCK_DLV_UNIT =
* BCK_BEG_ORIGIN =
bck_beg_date = l_fwd_beg_date
bck_beg_time = l_fwd_beg_time
* BCK_BEG_OFFSET =
* BCK_BEG_UNIT =
* WORK_PROCESS_GROUP = 'COWORK_BAPI'
* WORK_PROCESS_MAX = 99
IMPORTING
return = wa_return
TABLES
orders = i_orders
detail_return = i_detail_return
application_log = i_application_log.
.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Mar 25, 2015 at 01:13 PM

    Hi,

    You can use BAPI BAPI_PRODORD_CHANGE for this.

    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.