메뉴 건너뛰기

SAP 한국 커뮤니티

REPORT ZBAPI_ALE

sapjoy 2009.02.05 23:26 조회 수 : 2334

*&---------------------------------------------------------------------*
*& Report  ZBAPI_ALE                                                   *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*


REPORT  ZBAPI_ALE                                                   .



INCLUDE: <CNTAIN>.
DATA: L_RETURN TYPE SWOTRETURN,
      LT_CONT TYPE SWCONTTAB,
      L_OBJHND TYPE SWO_OBJHND,
      LS_GENERAL TYPE BAPI_ITOB,
      LS_GENERALX TYPE BAPI_ITOBX,
      LS_DATASPECIFIC LIKE  BAPI_ITOB_FL_ONLY,
      LS_DATASPECIFICX LIKE  BAPI_ITOB_FL_ONLYX,
      L_OBJKEY LIKE SWOTOBJID-OBJKEY.


************************************************************************
* parameter screen
PARAMETERS:
  P_FUNLOC TYPE BAPI_ITOB_PARMS-FUNCLOC_INT,
  P_DESC   TYPE BAPI_ITOB-DESCRIPT.
************************************************************************


L_OBJKEY = P_FUNLOC.
** instantiate object
CALL FUNCTION 'SWO_CREATE'
  EXPORTING
    OBJTYPE           = 'ZBUS0010'
    OBJKEY            = L_OBJKEY
    OBJNAME           = 'FuncLocation'
*    LOGICAL_SYSTEM    = 'LQACLNT700'
  IMPORTING
    OBJECT            = L_OBJHND
  EXCEPTIONS
    NO_REMOTE_OBJECTS = 1
    OTHERS            = 2.
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
************************************************************************
* pass data to container for bapi
LS_GENERAL-DESCRIPT = P_DESC.
LS_GENERALX-DESCRIPT = 'X'.


swc_set_element lt_cont 'FUNCTLOCATION' P_FUNLOC.
swc_set_element lt_cont 'DataGeneral' LS_GENERAL.
swc_set_element lt_cont 'DataGeneralx' LS_GENERALX.


* fire BAPI
CALL FUNCTION 'SWO_INVOKE'
  EXPORTING
*     ACCESS = 'C'
    OBJECT = L_OBJHND
    VERB = 'ReqFuncloc'
*     PERSISTENT = ' '
*     REQUESTER = ' '
*     SYNCHRON = '*'
*     UNSORTED_CONTAINER = ' '
*     NO_ARFC = ' '
  IMPORTING
    RETURN = L_RETURN
*     VERB =
*     MODE_ID =
  TABLES
    CONTAINER = LT_CONT.
************************************************************************
* COMMIT WORK를 수행해야만 Inbound Idoc이 생성됨
COMMIT WORK.
************************************************************************
* write out return parameter
WRITE:/ 'hola amigo', L_RETURN.

번호 제목 글쓴이 날짜 조회 수
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
327 REPORT ZBAPI_002. sapjoy 2009.02.10 2590
326 FUNCTION Z_BAPI_REQ_FUNCLOC. sapjoy 2009.02.05 2421
» 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 file 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