본문 바로가기
728x90
반응형

BAPI4

[MM] Release PO BAPI 릴리즈 T-CODE : ME29N 헤더 릴리즈 전략 탭PO 릴리즈 ( BAPI_PO_RELEASE ) DATA: LV_PO_REL_COD LIKE BAPIMMPARA-PO_REL_COD, LV_STATUS_NEW LIKE BAPIMMPARA-REL_STATUS, LV_INDICATOR_NEW LIKE BAPIMMPARA-PO_REL_IND, LT_RETURN LIKE TABLE OF BAPIRETURN. LV_PO_REL_COD = GC_3. CALL FUNCTION 'BAPI_PO_RELEASE' EXPORTING PURCHASEORDER = GS_DATA-EBELN PO_REL_CODE .. 2023. 3. 2.
[MM] Create PO BAPI BAPI_PO_CREATE1 CONSTANTS : LC_TYPE TYPE ESART VALUE 'NB'. DATA : LT_POITEM LIKE TABLE OF BAPIMEPOITEM, LT_POITEMX LIKE TABLE OF BAPIMEPOITEMX, LT_POACCOUNT LIKE TABLE OF BAPIMEPOACCOUNT WITH HEADER LINE, LT_POACCOUNTX LIKE TABLE OF BAPIMEPOACCOUNTX WITH HEADER LINE, LT_RETURN LIKE TABLE OF BAPIRET2 WITH HEADER LINE, .. 2023. 3. 2.
[SD] Order-Serial number Mapping BAPI SERNR_ADD_TO_AU 오더를 생성한뒤 해당 오더에 자재 일련번호를 매핑해주는 작업을 수행한다. FORM ADD_SERIAL_NUMBER TABLES ORDER_SERNR_IN STRUCTURE ZSSD00170 USING SALESDOCUMENT. DATA: LV_KWMENG TYPE RISA0-ANZAHL. SELECT AK~VBELN, AP~POSNR, AP~SERAIL, AK~KUNNR, AK~VBTYP, AK~AUART, AP~PSTYV, AP~KWMENG FROM VBAK AS AK INNER JOIN VBAP AS AP ON AK~VBELN EQ AP~VBELN WHERE AK~VBELN EQ @SALESDOCUMENT INTO TABLE @DATA(LT_SER02). IF ORDER_.. 2023. 2. 27.
[SD] 판매오더 생성 BAPI BAPI_CUSTOMERRETURN_CREATE BAPI_SALESORDER_CREATEFROMDAT2 오더유형(헤더 DOC_TYPE)이 반품이면 BAPI_CUSTOMERRETURN_CREATE 바피를 수행하고, 일반오더이면 BAPI_SALESORDER_CREATEFROMDAT2 바피를 수행한다. 오더유형 조회 테이블 -필드 TVAKAUART, TVAKTBEZEI, , TVAK~VBTYP *"*"Local interface: *" IMPORTING *" VALUE(ORDER_HEADER_IN) LIKE BAPISDHD1 STRUCTURE BAPISDHD1 *" EXPORTING *" VALUE(SALESDOCUMENT) TYPE BAPIVBELN-VBELN *" TABLES *" RETURN STRUCT.. 2023. 2. 27.
728x90
반응형