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: 

BAPI FHMI for Production Orders

Former Member
0 Kudos

Hello all,

I'am new to ABAP programming and try to solve a problem we face in our company with getting Production Order specific Informations out of the system. This Data is used for production purposes in an external system beside SAP. I managed already to get all necessary data out of the SAP system by creating RFC's, which are called with Python from outside. The only thing missing at the moment are the FHMI being used in the Production Order. I assume that i can get them by executing a BAPI call inside my ABAP script to BAPI_PRODORD_GET_DETAIL. There is a Parameter which needs to be passed called ORDER_OBJECTS of type BAPI_PP_ORDER_OBJECTS.

My problem is, since i never called a BAPI before, that all my tests didn't got a result back. I do not know if my parameter pass to the BAPI is not correct or the retrieving part when the BAPI is called. I only get a empty result back.

Maybe there is someone giving me an example how to do it the right way, or maybe a better way of getting the FHMI to a process-step in a Production Order.

I will be very thankful for any help provided.

Here my existing testcode:

REPORT ZTESTMAB1.

DATA: TEST LIKE BAPI_ORDER_PROD_REL_TOOLS OCCURS 0 WITH HEADER LINE,

MORDER_OBJECTS LIKE BAPI_PP_ORDER_OBJECTS OCCURS 1 WITH HEADER LINE.

MORDER_OBJECTS-PROD_REL_TOOLS = '1'.

CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'

EXPORTING

NUMBER = '619648'

ORDER_OBJECTS = MORDER_OBJECTS

TABLES

PROD_REL_TOOL = TEST.

write: / 'test'.

write: / TEST.

1 REPLY 1

Former Member
0 Kudos

Hi,

at first glance I say try NUMBER with leading zeroes or use CONVERSION_EXIT...

And there should be a BAPI-return-table that contains messages. Analize it!

Good luck!

Jo