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: 

How to use the BAPI BAPI_ALM_ORDER_MAINTAIN

Former Member
0 Kudos

HI experts,

I am using BAPI_ALM_ORDER_MAINTAIN to update the Object list in ECC 6.0 for a service order txn code IE31.

I dont know how to use this BAPI_ALM_ORDER_MAINTAIN for object list updation.

It will be very helpful if anyone who worked on this or know about BAPI_ALM_ORDER_MAINTAIN how to use, plz reply this thread.

I am really searching for along time about the bapi, but couldnt getany thing.

the doc of BAPI_ALM_ORDER_MAINTAIN is very vague, that i m not able to understand.

So, sap persons, plz reply this thread,

Ntk

14 REPLIES 14

Former Member
0 Kudos

Hi,

Just refer to the below thread.

Hope it helps.

Reward points if useful.

Regards,

Atish

0 Kudos

THNKS for ur reply,

but its a user status changing,

i have to change the object list. I am not able to do it with reference to it, as the complete structure is diffirent.

Plz help me out, with some example. I tried many ways, but the value passing to the FM with th objectlist is unknown to me.

ntk

0 Kudos

Sheshu thanks ,

I have gone thru those informations,

I have tried all those options, but i m also getting the same error, I always get a return error 'BAPI call-up must have a SAVE or DIALOG method'. I'm have no real idea what this means.

Also I am not understanding how to pass the Update structure BAPI_ALM_ORDER_OLIST_UP fields values for the Object list. I am on ECC 6.0.

It has only 2 fields, SORTFIELD

PROCESSING_IND.

I don tknow what are these and what values are to be passed.

I am going mad as its not able to make me understand,

Please can u please give me a psuedo code, if any one has worked on the objectlist..

Ntk

0 Kudos

Hi,

Can you just paste your code.

Regards,

Atish

0 Kudos

here is sample program to change the object list.,,

DATA: l_alm_bapi TYPE c,

T_METHODS TYPE STANDARD TABLE OF bapi_alm_order_method,

ls_methodS TYPE bapi_alm_order_method,

LS_OBJ type bapi_alm_order_objectlist,

lt_OBJ type standard table of bapi_alm_order_objectlist,

lt_operation

TYPE STANDARD TABLE OF bapi_alm_order_objectlist,

ls_operation_up TYPE bapi_alm_order_olist_up,

lt_return TYPE STANDARD TABLE OF bapiret2,

ls_return TYPE bapiret2,

LS_NUMBERS TYPE BAPI_ALM_NUMBERS,

T_NUMBERS TYPE STANDARD TABLE OF BAPI_ALM_NUMBERS.

CLEAR T_METHODS.

LS_METHODS-REFNUMBER = '000000'.

LS_METHODS-OBJECTTYPE = ' '.

LS_METHODS-METHOD = 'SAVE'.

APPEND LS_METHODS TO T_METHODS.

CLEAR T_METHODS.

LS_METHODS-REFNUMBER = 1.

LS_METHODS-OBJECTTYPE = 'OBJECTLIST'.

LS_METHODS-METHOD = 'CHANGE'.

LS_METHODS-OBJECTKEY = '000004010558'..

APPEND LS_METHODS TO T_METHODS.

CLEAR T_NUMBERS.

LS_NUMBERS-AUFNR_IN = '000004010558'..

APPEND LS_NUMBERS TO T_NUMBERS.

LS_OBJ-FUNCT_LOC = '5619'.

LS_OBJ-EQUIPMENT = '0000010000291'.

APPEND LS_OBJ TO LT_OBJ.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

IT_METHODS = T_METHODS

  • IT_HEADER =

  • IT_HEADER_UP =

  • IT_HEADER_SRV =

  • IT_HEADER_SRV_UP =

  • IT_USERSTATUS =

  • IT_PARTNER =

  • IT_PARTNER_UP =

  • IT_OPERATION =

  • IT_OPERATION_UP =

  • IT_RELATION =

  • IT_RELATION_UP =

  • IT_COMPONENT =

  • IT_COMPONENT_UP =

IT_OBJECTLIST = LT_OBJ

  • IT_OBJECTLIST_UP =

  • IT_OLIST_RELATION =

  • IT_TEXT =

  • IT_TEXT_LINES =

  • IT_SRULE =

  • IT_SRULE_UP =

  • IT_TASKLISTS =

  • EXTENSION_IN =

RETURN = LT_RETURN

ET_NUMBERS = T_NUMBERS.

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

  • EXPORTING

  • WAIT =

0 Kudos

Hi,

You need to update this table

IT_OBJECTLIST_UP

Just pass X to the fields in this table and try.

Regards,

Atish

0 Kudos

Atish,

i hve tried passing X to these variable, SORTFIELD

PROCESSING_IND

But it didnt work..

the same error is comeing in the return table of the BAPI. before the commit bapi

0 Kudos

Basically i m not understanding how the methods, header, tables are filled.

In my case its changing the order, not creating.

I have searching many sites, it says some %0000 etc has to pass, i ddidnt understand that..

also i have to pass the objectlist, and maintain them. before the order is saved. in the userexit

Ntk

0 Kudos

Friends,

I am getting the following message with the FM BAPI_ALM_ORDER_MAINTAIN, "Order is changed, but not created".

But when i see the Service Order, im not able to see the new equipments added in the Object tab.

Here is my code...

DATA: l_alm_bapi TYPE c,

T_METHODS TYPE STANDARD TABLE OF bapi_alm_order_method,

ls_methodS TYPE bapi_alm_order_method,

LS_OBJ type bapi_alm_order_objectlist,

lt_OBJ type standard table of bapi_alm_order_objectlist,

lt_operation

TYPE STANDARD TABLE OF bapi_alm_order_objectlist,

ls_operation TYPE bapi_alm_order_objectlist,

lt_oBJ_up

TYPE STANDARD TABLE OF bapi_alm_order_olist_up,

ls_oBJ_up TYPE bapi_alm_order_olist_up,

lt_return TYPE STANDARD TABLE OF bapiret2,

lt_return1 like BAPIRET2,

ls_return TYPE bapiret2,

LS_NUMBERS TYPE BAPI_ALM_NUMBERS,

T_NUMBERS TYPE STANDARD TABLE OF BAPI_ALM_NUMBERS.

CLEAR T_METHODS.

LS_METHODS-REFNUMBER = 1.

LS_METHODS-OBJECTTYPE = ''.

LS_METHODS-METHOD = 'SAVE'.

LS_METHODS-OBJECTKEY = '%00000000001'..

APPEND LS_METHODS TO T_METHODS.

LS_METHODS-REFNUMBER = 1.

LS_METHODS-OBJECTTYPE = 'OBJECTLIST'.

LS_METHODS-METHOD = 'CHANGE'.

LS_METHODS-OBJECTKEY = '%00000000001'..

APPEND LS_METHODS TO T_METHODS.

CLEAR T_NUMBERS.

LS_NUMBERS-AUFNR_IN = '000004010558'..

APPEND LS_NUMBERS TO T_NUMBERS.

LS_OBJ-COUNTER = 1.

LS_OBJ-FUNCT_LOC = '5619'.

LS_OBJ-EQUIPMENT = '0000010000292'.

LS_OBJ-SORTFIELD = 'X'.

ls_oBJ-PROCESSING_IND = 'X'.

ls_oBJ-SERIALNO = ''.

ls_oBJ-SERMAT = '0010-30000'.

ls_oBJ-DESCRIPTN = 'MAIN UNIT DR300'.

APPEND LS_OBJ TO LT_OBJ.

LS_OBJ_UP-SORTFIELD = 'X'.

LS_OBJ_UP-PROCESSING_IND = 'X'.

APPEND LS_OBJ_UP TO LT_OBJ_UP.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

IT_METHODS = T_METHODS

  • IT_HEADER =

  • IT_HEADER_UP =

  • IT_HEADER_SRV =

  • IT_HEADER_SRV_UP =

  • IT_USERSTATUS =

  • IT_PARTNER =

  • IT_PARTNER_UP =

  • IT_OPERATION =

  • IT_OPERATION_UP =

  • IT_RELATION =

  • IT_RELATION_UP =

  • IT_COMPONENT =

  • IT_COMPONENT_UP =

IT_OBJECTLIST = LT_OBJ

IT_OBJECTLIST_UP = LT_OBJ_UP

  • IT_OLIST_RELATION =

  • IT_TEXT =

  • IT_TEXT_LINES =

  • IT_SRULE =

  • IT_SRULE_UP =

  • IT_TASKLISTS =

  • EXTENSION_IN =

RETURN = LT_RETURN

ET_NUMBERS = T_NUMBERS.

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

IMPORTING

RETURN = lt_return1.

Kindly help me out anyone who has worked with these FM. I am not able to do this.

0 Kudos

tx

0 Kudos

I am running into the same issue when testing in SE37. Did you get this resolved and if so, what fields did you need to populate?

Former Member
0 Kudos

if it is just the user status then try

BAPI_ISUSMORDER_USERSTATUSSET

Former Member
0 Kudos

Hi, could you modify the OBJECTLIST values using the bapi?

I need to remove a notification from the order using this bapi to avoid a batch input.

Any tip will help.

Thanks.

Regards!