11-07-2017 7:47 AM
Hi all. I tried to change production order with FM CLOI_CHANGES_UPL_31, but without success. After I call FM with passed cloi_if_par and cloi_ord_ordu_imp in debugging I can see passed values of cloi_if_par in CLOI_CHANGES_UPL_31 but not cloi_ord_ordu_imp.
Could somebody help me? I don't know where is problem.
Here is my code:
DATA gs_cloi_if_par_v2 LIKE cloiifpar.
DATA gt_cloi_ordu TYPE STANDARD TABLE OF cloiordu.
DATA gt_cloi_methods_exp TYPE STANDARD TABLE OF cloimetlog.
DATA gt_cloi_messages_exp TYPE STANDARD TABLE OF cloimsglog.
DATA gt_cloi_msg_obj_log_exp TYPE STANDARD TABLE OF cloimoblog.
DATA gt_cloi_ord_exp TYPE STANDARD TABLE OF cloiord.
DATA gv_flag(1) TYPE c.
.
.
.
.
FORM update_orders.
CLEAR gv_flag.
CALL FUNCTION 'CLOI_CHANGES_UPL_31'
STARTING NEW TASK 'YMES_ORDERS_RESCHEDULE'
PERFORMING receive_result ON END OF TASK
EXPORTING
cloi_if_par = gs_cloi_if_par_v2
TABLES
cloi_ord_ordu_imp = gt_cloi_ordu
cloi_method_log_exp = gt_cloi_methods_exp
cloi_message_log_exp = gt_cloi_messages_exp
cloi_msg_obj_log_exp = gt_cloi_msg_obj_log_exp
cloi_ord_exp = gt_cloi_ord_exp.
WAIT UNTIL gv_flag = 'X'.
REFRESH gt_cloi_ordu.
REFRESH gt_cloi_methods_exp.
REFRESH gt_cloi_messages_exp.
REFRESH gt_cloi_msg_obj_log_exp.
* REFRESH gt_cloi_ord_exp.
ENDFORM.
FORM receive_result USING taskname.
RECEIVE RESULTS FROM FUNCTION 'CLOI_CHANGES_UPL_31'
TABLES
cloi_method_log_exp = gt_cloi_methods_exp
cloi_message_log_exp = gt_cloi_messages_exp
cloi_msg_obj_log_exp = gt_cloi_msg_obj_log_exp
cloi_ord_exp = gt_cloi_ord_exp.
gv_flag = 'X'.
ENDFORM.
11-30-2017 1:47 PM
Hey,
First, of the task name should be up to 32 chars and must be unique - not sure you achieve this with 'YMES_ORDERS_RESCHEDULE'.
Second, change the type of gt_cloi_ordu to TYPE STANDARD TABLE OF cloioperu.
Third, can you add a screen shot of your debbuger screen with the table gt_cloi_ordu open on "Tables" tab of the debugger?
11-30-2017 3:46 PM