Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

BAPI_ADDRESSORG_CHANGE HELP DON'T WORK

$
0
0

DATA: objtype LIKE bapi4001_1-objtype,
          obj_id LIKE bapi4001_1-objkey,
          obj_id_ext LIKE bapi4001_1-extension,
          context LIKE bapi4001_1-context,
          address_number LIKE adrc-addrnumber,
          bapiadtel LIKE bapiadtel OCCURS0WITHHEADERLINE,
          bapiadtelx LIKE bapiadtelx OCCURS0WITHHEADERLINE,
           returnLIKE bapiret2 OCCURS0,
           bapiadsmtp LIKE  bapiadsmtp OCCURS0WITHHEADERLINE,
           BAPIADSMTX like BAPIADSMTX occurs0withheaderline,
           bapiad1vl LIKE bapiad1vl OCCURS0WITHHEADERLINE,
             bapiad1vlx LIKE bapiad1vlx OCCURS0WITHHEADERLINE.




   SELECTSINGLE * FROM lfa1 WHERE stcd1 = zfialtap-stcd1.
   objtype = 'LFA1'.
   obj_id =  lfa1-lifnr.
   obj_id_ext = ' '.
   context = '001'.


CALLFUNCTION'BAPI_ADDRESSORG_GETDETAIL'

   EXPORTING

     obj_type                   = objtype
     obj_id                     = obj_id
       OBJ_ID_EXT                 = obj_id_ext
       CONTEXT                    = context
*      IV_CURRENT_COMM_DATA       = 'X'
IMPORTING
    ADDRESS_NUMBER             = address_number
TABLES
       BAPIAD1VL                  = BAPIAD1VL
*   BAPIADTEL                  = bapiadtel
*      BAPIADFAX                  =
*      BAPIADTTX                  =
*      BAPIADTLX                  =
*      BAPIADSMTP                 =
*      BAPIADRML                  =
*      BAPIADX400                 =
*      BAPIADRFC                  =
*      BAPIADPRT                  =
*      BAPIADSSF                  =
*      BAPIADURI                  =
*      BAPIADPAG                  =
*      BAPIAD_REM                 =
*      BAPICOMREM                 =
*      BAPIADUSE                  =

       RETURN                     =  RETURN

           .

objtype = 'LFA1'.
   obj_id =  lfa1-lifnr.
   obj_id_ext = ' '.
   context = '001'.

****************direccion*****************************+++

   LOOPAT bapiad1vl.
   bapiad1vl-sort1 = zfialtap-sort1.
   bapiad1vlx-sort1 = 'X'.
   bapiad1vl-str_suppl3 = zfialtap-str_suppl3.
   bapiad1vlx-str_suppl3 = 'X'.
   bapiad1vl-house_no = zfialtap-house_num1.
   bapiad1vlx-house_no = 'X'.
   bapiad1vl-location = zfialtap-location.
   bapiad1vlx-location = 'X'.
   bapiad1vl-district = zfialtap-city2.
   bapiad1vlx-district = 'X'.
   bapiad1vl-home_city = zfialtap-location.
   bapiad1vlx-home_city = 'X'.
   bapiad1vl-house_no2 = zfialtap-house_num2.
   bapiad1vlx-house_no2 = 'X'.
   bapiad1vlx-updateflag = 'U'.
APPEND BAPIAD1VLX.
MODIFY BAPIAD1VL.
ENDLOOP.
*
COMMITWORK.
*

   CALLFUNCTION'BAPI_ADDRESSORG_CHANGE'
     EXPORTING
       obj_type                          = objtype
       obj_id                            = obj_id
      obj_id_ext                        = ' '
      context                           = '001'
*   ACCEPT_ERROR                      = 'X'
*      SAVE_ADDRESS                      = 'X'
*      IV_CHECK_ADDRESS                  = 'X'
*      IV_TIME_DEPENDENT_COMM_DATA       = ' '
   IMPORTING
      address_number                    = address_number
   TABLES
       BAPIAD1VL                         = BAPIAD1VL
*       BAPIADTEL                         = BAPIADTEL
*      BAPIADFAX                         =
*      BAPIADTTX                         =
*      BAPIADTLX                         =
*        bapiadsmtp                        =  bapiadsmtp
*      BAPIADRML                         =
*      BAPIADX400                        =
*      BAPIADRFC                         =
*      BAPIADPRT                         =
*      BAPIADSSF                         =
*      BAPIADURI                         =
*      BAPIADPAG                         =
*      BAPIAD_REM                        =
*      BAPICOMREM                        =
*      BAPIADUSE                         =
       BAPIAD1VL_X                       =  bapiad1vlx
*       BAPIADTEL_X                       = bapiadtelx
*      BAPIADFAX_X                       =
*      BAPIADTTX_X                       =
*      BAPIADTLX_X                       =
*      BAPIADSMT_X                       = BAPIADSMTX
*      BAPIADRML_X                       =
*      BAPIADX40_X                       =
*      BAPIADRFC_X                       =
*      BAPIADPRT_X                       =
*      BAPIADSSF_X                       =
*      BAPIADURI_X                       =
*      BAPIADPAG_X                       =
*      BAPIAD_RE_X                       =
*      BAPICOMRE_X                       =
*      BAPIADUSE_X                       =
      return                            = return  .


   CALLFUNCTION'BAPI_TRANSACTION_COMMIT'

    .

I need  to update date of  direcction  in the  transaction xk01  but  I can  to do ..

 

Pleas  help  me  thansk


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>