cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI for Creating External Operation with Service Line

former_member211679
Participant
0 Kudos

Hi SAP Gurus,

I have a requirement of Create a Work Order of External Operation with Service Line by using BAPI ,For that I am using a BAPI_ALM_ORDER_MAINTAIN with following test data

IT_METHODS

REFNUMBER OBJECTTYPE METHOD OBJECTKEY

1                     HEADER         CREATE   %00000000001

1                     OPERATION    CREATE   %00000000001

1                      SAVE

IT_HEADER

ORDERID       ORDER_TYPE PLANPLANT MN_WK_CTR PLANT PLANGROUP  EQUIPMENT  START_DATE PRIORITY  SHORT_TEXT

%00000000001  ZM01               US05             PM00000         US05    ELE               10026344         27.07.2015        3               DEMO WORK ORDER


IT_OPERATION


ACTIVITY       CONTROL_KEY   WORK_CNTR  PLANT     DESCRIPTION     PURCH_ORG     PUR_GROUP  MATL_GROUP

0020                    PM03                PM00000         US05  DEMO OPERATIONS   USP1                 204                    AMINOACID


IT_SERVICEOUTLINE


ACTIVITY      OUTLINE           SHORT_TEXT                  FROM_LINE       

0020               0000000001          DEMO SERVICE LINE       1



IT_SERVICELINES


ACTIVITY     OUTLINE         SRV_LINE      SHORT_TEXT                   QUANTITY     UOM

0020              0000000001     0000000010      DEMO SERVICE LINE        1                    AU


Whenever i am executing the BAPI_ALM_ORDER_MAINTAIN with above test data along with BAPI_TRANSACTION_COMMIT, the work order is created without  service line (0010)  of external operation (0020), I tried several times but without luck, Please help


Help would be appreciated


Thanks

Sumit














,

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sumit,

I can't comment on your code - but you need to be careful with this BAPI. It is technically possible to assign a Service Item to an Operation - but the BAPI does not trigger follow on function modules that maintain the Service Item Account Assignment information. Without this step, it is difficult to generate the Purchase Order from the Purchase Req.

FG

former_member211679
Participant
0 Kudos

Hello Pete,

Thanks for responding Information in the RETURN table are :

RETURN

typ     message

S       Order %00000000001 was saved with number 62000504 and notification 10003198.

S       BAPI Control was ended.

peter_atkin
Active Contributor
0 Kudos

Sumit,

Is there any information in the RETURN table?

PeteA

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Sumit,

I'm afraid the related experience is not available here. After some wait, better to post this to ABAP space.

Meanwhile you go through these related discussions:

Getting BAPI_ALM_ORDER_MAINTAIN work for updati... | SCN

BAPI_ALM_ORDER_MAINTAIN to create Operation | SCN

how to use BAPI_ALM_ORDER_MAINTAIN to update op... | SCN

Often what happens is: We get clues even in Not answered discussions also.

Good luck

KJogeswaraRao

former_member211679
Participant
0 Kudos

Hello Jogeshwara,

Thanks for responding,I think i need to forward this Discussion to ABAP Space.

former_member211679
Participant
0 Kudos

Hello Jogeshwara,

Could you please guide me  to forward this Discussion to ABAP Space,I am not able find the options.

MTerence
Active Contributor
0 Kudos

Hi Sumit,

Tagging ABAP for your reference

Regards

Terence

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Sumit,

First navigate to this page scn.sap.com/community/abap  Then create discussion the way you create here in EAM space.

Good luck

KJogeswaraRao

former_member211679
Participant
0 Kudos

Thanks Jogeshwara

former_member211679
Participant
0 Kudos

Thanks Maria