Application Development and Automation 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: 
Read only

How to get BAPI_EQUI_CREATE working

Former Member
0 Likes
2,838

I want to use BAPI BAPI_EQUI_CREATE to create equipment. When trying to create an equipment by test-running that BAPI i get no error message, the BAPI returns with a new equipment number and still there is no new equipment with that number. I have the same problem with BAPI_EQUI_CREATE_BY_REFERENCE and there is no big chance to forget any importing parameter with this function module.

Do i have to start those BAPIs in a program and call a certain other BAPI before??

Thanks for your help.

Jens.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,387

Hi,

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = WL_EQUNR

IMPORTING

OUTPUT = WL_EQUNR.

WL_FLAGS-CP_MEASPT = C_CHECK.

WL_FLAGS-CP_MPT_TXT = C_CHECK.

CALL FUNCTION 'BAPI_EQUI_CREATE_BY_REFERENCE'

EXPORTING

REFERENCE_NUMBER = WL_EQUNR

COPY_FLAGS = WL_FLAGS

IMPORTING

EQUIPMENT = WL_EQUI-EQUNR

DATA_GENERAL_EXP = WL_GEN

DATA_SPECIFIC_EXP = WL_SPE

RETURN = WL_RETURN

EXCEPTIONS

OTHERS = 1.

IF WL_RETURN(1) = 'E'.

MESSAGE E899(M3) WITH WL_RETURN-MESSAGE(50)

WL_RETURN-MESSAGE+50(50).

  • fp_return = sy-subrc.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = C_CHECK.

Just try like above

5 REPLIES 5
Read only

former_member225448
Participant
0 Likes
1,387

Hello Jens,

<b>BAPI_EQUI_CREATE</b> is waiting for a call to <b>BAPI_TRANSACTION_COMMIT</b>, as any real BAPI should. Otherwise no Update modules triggered in the BAPI will be started.

If you find my answer useful, please don't forget the reward.

Regards,

Juergen

Read only

0 Likes
1,387

Hello Juergen,

thank you very much for your answer. As you might have noticed i do not have to much experience with bapis yet. It's working now.

Read only

Former Member
0 Likes
1,388

Hi,

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = WL_EQUNR

IMPORTING

OUTPUT = WL_EQUNR.

WL_FLAGS-CP_MEASPT = C_CHECK.

WL_FLAGS-CP_MPT_TXT = C_CHECK.

CALL FUNCTION 'BAPI_EQUI_CREATE_BY_REFERENCE'

EXPORTING

REFERENCE_NUMBER = WL_EQUNR

COPY_FLAGS = WL_FLAGS

IMPORTING

EQUIPMENT = WL_EQUI-EQUNR

DATA_GENERAL_EXP = WL_GEN

DATA_SPECIFIC_EXP = WL_SPE

RETURN = WL_RETURN

EXCEPTIONS

OTHERS = 1.

IF WL_RETURN(1) = 'E'.

MESSAGE E899(M3) WITH WL_RETURN-MESSAGE(50)

WL_RETURN-MESSAGE+50(50).

  • fp_return = sy-subrc.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = C_CHECK.

Just try like above

Read only

0 Likes
1,387

Hi Ramesh,

thank you for your example coding. It works very well.

Read only

0 Likes
1,387

This message was moderated.