REPORT ZBAPI_002.
*Global 변수선언---
DATA : GENERALDATAX TYPE BAPI1022_FEGLG001X,
GENERALDATA TYPE BAPI1022_FEGLG001,
RETURN TYPE BAPIRET2.
DATA : L_ANLN1 LIKE BAPI1022_1-ASSETMAINO,
L_ANLN2 LIKE BAPI1022_1-ASSETSUBNO,
G_ANSWER.
*Selection Screen(조건화면)---
SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME.
PARAMETERS : P_BUKRS LIKE BAPI1022_1-COMP_CODE OBLIGATORY, “회사코드
P_ANLN1 LIKE BAPI1022_1-ASSETMAINO OBLIGATORY, “자산번호
P_ANLN2 LIKE BAPI1022_1-ASSETSUBNO OBLIGATORY DEFAULT '0',“하위번호
P_TEXT LIKE ANLA-TXT50 OBLIGATORY. “ 변경할 자산명
SELECTION-SCREEN END OF BLOCK BOX1.
START-OF-SELECTION.
CLEAR : G_ANSWER.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' “변경할지 여부 확인
EXPORTING
TEXTLINE1 = '저장 하시겠습니까?'
TITEL = '저장여부확인'
CANCEL_DISPLAY = ''
IMPORTING
ANSWER = G_ANSWER.
IF G_ANSWER EQ 'J'.
* 자산번호 자릿수 맞추기
CLEAR : L_ANLN1, L_ANLN2.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_ANLN1
IMPORTING
OUTPUT = L_ANLN1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_ANLN2
IMPORTING
OUTPUT = L_ANLN2.
* General 영역 변경 값
GENERALDATA-DESCRIPT = P_TEXT. "변경할 자산명
* General 영역 변경 여부 Flag
GENERALDATAX-DESCRIPT = 'X'. "자산명
* 자산 변경 BAPI
CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'
EXPORTING
COMPANYCODE = P_BUKRS
ASSET = L_ANLN1
SUBNUMBER = L_ANLN2
GENERALDATA = GENERALDATA
GENERALDATAX = GENERALDATAX
IMPORTING
RETURN = RETURN.
* BAPI 실행 Commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE:/(4) RETURN-TYPE,(80) RETURN-MESSAGE. “결과값
ENDIF.
END-OF-SELECTION.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
331 | REPORT zsapgos_002. | sapjoy | 2009.02.12 | 2458 |
330 | REPORT ZSAPGOS_001. | sapjoy | 2009.02.12 | 2477 |
329 | FUNCTION Z_BAPIALE_SEND. | sapjoy | 2009.02.10 | 2420 |
328 | REPORT zale_001 . | sapjoy | 2009.02.10 | 2471 |
» | REPORT ZBAPI_002. | sapjoy | 2009.02.10 | 2590 |
326 | FUNCTION Z_BAPI_REQ_FUNCLOC. | sapjoy | 2009.02.05 | 2421 |
325 | REPORT ZBAPI_ALE | sapjoy | 2009.02.05 | 2334 |
324 | zbapi_java | sapjoy | 2009.02.02 | 2699 |
323 | FUNCTION Z_BAPI_ASSETNAME_SEARCH | sapjoy | 2009.01.31 | 2898 |
322 | REPORT z18_003 | sapjoy | 2007.03.06 | 3281 |
321 | REPORT ZSMARTFORMS_07. | sapjoy | 2009.01.22 | 2389 |
320 | REPORT zBADI_FIND | sapjoy | 2009.01.16 | 2732 |
319 | REPORT ZBADI_003. | sapjoy | 2009.01.15 | 2403 |
318 | REPORT zbadi_002. | sapjoy | 2009.01.10 | 2545 |
317 | REPORT zbadi_001 | sapjoy | 2009.01.07 | 2527 |
316 | doi_excel.xls | sapjoy | 2008.12.26 | 2177 |
315 | report zsapdoi_005. | sapjoy | 2008.12.26 | 2978 |
314 | report zsapdoi_004. | sapjoy | 2008.12.26 | 2932 |
313 | report zsapdoi_003. | sapjoy | 2008.12.26 | 2570 |
312 | report zsapdoi_002. | sapjoy | 2008.12.26 | 4405 |