BAPI_ALM_ORDER_MAINTAIN Auftrag anlegen funktioniert nicht

Getting started ... Alles für einen gelungenen Start.
1 Beitrag • Seite 1 von 1
1 Beitrag Seite 1 von 1

BAPI_ALM_ORDER_MAINTAIN Auftrag anlegen funktioniert nicht

Beitrag von tekko (ForumUser / 35 / 19 / 1 ) » 18.03.2020 13:57
Hallo Leute,
wieso wird mir hier kein Auftrag angelegt?

Code: Alles auswählen.

REPORT ZSUBCONORDER.


Data: it_methods TYPE STANDARD TABLE OF BAPI_ALM_ORDER_METHOD.
it_methods = VALUE #( ( REFNUMBER = '000001'
                        OBJECTTYPE = 'HEADER'
                        METHOD = 'CREATE'
                        OBJECTKEY = '%00000000001' ) ).

it_methods = VALUE #( ( REFNUMBER = '000001'
                        OBJECTTYPE = 'OPERATION'
                        METHOD = 'CREATE'
                        OBJECTKEY = '%00000000001' ) ).

it_methods = VALUE #( ( REFNUMBER = '000001'
                        METHOD = 'SAVE'
                        OBJECTKEY = '%00000000001' ) ).



Data IT_HEADER TYPE STANDARD TABLE OF BAPI_ALM_ORDER_HEADERS_I.
IT_HEADER = VALUE #( (  ORDER_TYPE = 'PM01'
                        MN_WK_CTR = 'MECHANIK'
                        PMACTTYPE = '103'
                        FUNCT_LOC = 'K1-ZPW-2'
                        START_DATE = '18032020'
                        FINISH_DATE = '20032020'
                        PRIORITY = '1'
                        SHORT_TEXT = 'LB über SE38') ).



DATA IT_HEADER_UP Type STANDARD TABLE OF BAPI_ALM_ORDER_HEADERS_UP.
IT_HEADER_UP = VALUE #( (
                        MN_WK_CTR = 'X'
                        PMACTTYPE = 'X'
                        FUNCT_LOC = 'X'
                        START_DATE = 'X'
                        FINISH_DATE = 'X'
                        PRIORITY = 'X'
                        SHORT_TEXT = 'X') ).


DATA IT_OPERATION TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OPERATION.
IT_OPERATION = VALUE #( (
                        ACTIVITY = '0010'
                        CONTROL_KEY = 'PM02'
                        DESCRIPTION = 'ABC'
                        SUBCONTRACTING = 'X'
                          ) ).

DATA IT_OPERATION_UP TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OPERATION_UP.
IT_OPERATION_UP = VALUE #( (
                            ACTIVITY = 'X'
                            CONTROL_KEY = 'X'
                            DESCRIPTION = 'X'
                            SUBCONTRACTING = 'X'
                            ) ).


DATA ET_NUMBERS TYPE STANDARD TABLE OF BAPI_ALM_NUMBERS WITH HEADER LINE.
DATA wa_et_Numbers type BAPI_ALM_NUMBERS.


DATA Return TYPE STANDARD TABLE OF BAPIRET2.
DATA wa_return type BAPIRET2.





CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
* EXPORTING
*   IV_MMSRV_EXTERNAL_MAINTENACE       =
  TABLES
    it_methods                         = it_methods
    IT_HEADER                          = IT_HEADER
    IT_HEADER_UP                       = IT_HEADER_UP
*   IT_HEADER_SRV                      =
*   IT_HEADER_SRV_UP                   =
*   IT_USERSTATUS                      =
*   IT_PARTNER                         =
*   IT_PARTNER_UP                      =
    IT_OPERATION                       = IT_OPERATION
    IT_OPERATION_UP                    = IT_OPERATION_UP
*   IT_RELATION                        =
*   IT_RELATION_UP                     =
*   IT_COMPONENT                       =
*   IT_COMPONENT_UP                    =
*   IT_OBJECTLIST                      =
*   IT_OBJECTLIST_UP                   =
*   IT_OLIST_RELATION                  =
*   IT_TEXT                            =
*   IT_TEXT_LINES                      =
*   IT_SRULE                           =
*   IT_SRULE_UP                        =
*   IT_TASKLISTS                       =
*   EXTENSION_IN                       =
    RETURN                             = RETURN
    ET_NUMBERS                         = ET_NUMBERS
*   IT_REFORDER_ITEM                   =
*   IT_REFORDER_ITEM_UP                =
*   IT_REFORDER_SERNO_OLIST_INS        =
*   IT_REFORDER_SERNO_OLIST_DEL        =
*   IT_PRT                             =
*   IT_PRT_UP                          =
*   IT_REFORDER_OPERATION              =
*   IT_SERVICEOUTLINE                  =
*   IT_SERVICEOUTLINE_UP               =
*   IT_SERVICELINES                    =
*   IT_SERVICELINES_UP                 =
*   IT_SERVICELIMIT                    =
*   IT_SERVICELIMIT_UP                 =
*   IT_SERVICECONTRACTLIMITS           =
*   IT_SERVICECONTRACTLIMITS_UP        =
*   ET_NOTIFICATION_NUMBERS            =
*   IT_PERMIT                          =
*   IT_PERMIT_UP                       =
*   IT_PERMIT_ISSUE                    =
*   IT_ESTIMATED_COSTS                 =
          .




CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = ' '
* IMPORTING
*   RETURN        =
          .



Seite 1 von 1