2016 Jun 23 9:31 AM
Hi All,
we are using BAPI : BAPI_ALM_ORDER_MAINTAIN to create the multiple components with different materials , it is creating components with same material , same item number , same details repeated twice in the components tab in the Order.
passing below details to bapi: lt_methods:
| 000001 | HEADER | CREATE | %00000000001 |
| 000001 | COMPONENT | CREATE | %000000000010010 |
| 000001 | COMPONENT | CREATE | %000000000010020 |
| 000001 | TASKLIST | ADD | %00000000001 |
| 000000 | SAVE |
passing lt_componets as :
materail , stge_loc , item_Cat ,
item_number as : 0010 , 0020 , activity as : 0010 , 0020 , requirement_quantity . and passing same parameter to it_components_up aswell.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = lt_methods
it_header = lt_header
it_header_up = lt_header_up
it_component = lt_component
it_component_up = lt_component_up
it_tasklists = lt_tasklist
return = lt_return
et_numbers = lt_et_numbers.
even though we are passing different materials and item numbers still it is creating with one material only in components .
kindly help us on this.
regards,
Arpita
2016 Jun 23 10:25 AM
Hi,
You are adding 2 components and giving same reference number in method table. The reference number should be in increasing order for components.
Give the values in method table as -
000001 COMPONENT CREATE %000000000010010
000002 COMPONENT CREATE %000000000010020
Try this. It will work.
Regards
Ashish
Hi All,
we are using BAPI : BAPI_ALM_ORDER_MAINTAIN to create the multiple components with different materials , it is creating components with same material , same item number , same details repeated twice in the components tab in the Order.
passing below details to bapi: lt_methods:
| 000001 | HEADER | CREATE | %00000000001 |
| 000001 | COMPONENT | CREATE | %000000000010010 |
| 000001 | COMPONENT | CREATE | %000000000010020 |
| 000001 | TASKLIST | ADD | %00000000001 |
| 000000 | SAVE |
passing lt_componets as :
materail , stge_loc , item_Cat ,
item_number as : 0010 , 0020 , activity as : 0010 , 0020 , requirement_quantity . and passing same parameter to it_components_up aswell.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = lt_methods
it_header = lt_header
it_header_up = lt_header_up
it_component = lt_component
it_component_up = lt_component_up
it_tasklists = lt_tasklist
return = lt_return
et_numbers = lt_et_numbers.
even though we are passing different materials and item numbers still it is creating with one material only in components .
kindly help us on this.
regards,
Arpita
2016 Jun 23 10:25 AM
Hi,
You are adding 2 components and giving same reference number in method table. The reference number should be in increasing order for components.
Give the values in method table as -
000001 COMPONENT CREATE %000000000010010
000002 COMPONENT CREATE %000000000010020
Try this. It will work.
Regards
Ashish
2016 Jun 23 10:33 AM
Thanks Ashish.
I tried the same. see below screen shot og LT_METHODS[].
| 1 | 000001 | HEADER | CREATE | %00000000001 |
| 2 | 000001 | COMPONENT | CREATE | %000000000010010 |
| 3 | 000002 | COMPONENT | CREATE | %000000000010020 |
| 4 | 000001 | TASKLIST | ADD | %00000000001 |
| 5 | 000000 | SAVE |
But I am getting below error in LT_RETURN[]
Type = 'E'
Message = 'Operation number 0020 does not exist (check entry)'
Thanks,
Arpita
2016 Jun 23 10:40 AM
Hi,
It's giving this error due to the key which you have given in method table for component,
i.e. - %000000000010020.
There is no need of giving it. Just give the key as %00000000001 and pass the operation number in ACTIVITY field of component table. Remove the 0010 and 0020.
and try again.
2016 Jun 23 11:18 AM
Hi Ashish,
can you please eloborate what you mean in the above thread.
i tried removing the %00000000001010 and %0000000000120 to below
| 1 | 000001 | HEADER | CREATE | %00000000001 |
| 2 | 000001 | COMPONENT | CREATE | %0000000000100 |
| 3 | 000002 | COMPONENT | CREATE | %0000000000100 |
| 4 | 000001 | TASKLIST | ADD | %00000000001 |
| 5 | 000000 | SAVE | ||
| ______________________________ |
\and also do you mean i need to pass ACTIVITY as 0010 , 0020 and remove item number?what need to pass as operation number in activity?
thanks
Arpita
2016 Jun 23 11:24 AM
Hi,
Are you creating any operation in your order.?
In the components table of BAPI there are fields for ACTIVITY, ITEM NUMBER. Pass the operation number in activity, if you are creating any operation and to which operation you want to pass the component.
Fill the method table in this way -
1 000001 HEADER CREATE %00000000001
2 000001 COMPONENT CREATE %00000000001
3 000002 COMPONENT CREATE %00000000001
4 000001 TASKLIST ADD %00000000001
5 000000 SAVE
Remove the 0010 , 0020 from %00000000001, the key value which you are passing for components.
2016 Jun 23 12:20 PM
Hi Ashish ,
thank you , it is working now.
i am not creating operations , so i have passed activity as blank.
regards,
Arpita
2016 Jun 23 12:24 PM
Nice,
That's what I was asking about operation.
Regards
Ashish
2019 Jul 03 1:02 PM
Hi ,
I am completely new to PM Module.
I need to create Work Order in Mass using BAPI_ALM_ORDER_MAINTAIN. please let me know the step by step procedure to do it. what input to pass to Create Order number, get Task List Details related to operation.
All in creation mode. Sample code will be much helpful.
Please reply
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |