Data transfer using BAPI'S

please get me the detailed procedure  ( including code) of any data transfer program using BAPI's

check the sample code....it is used to transfer the data to MM01 tcode.
*TO CREATE MATERIAL USING BAPI.
STRUCTURE DECLARATIONS *
TABLES: BAPIMATHEAD, "Headerdata
BAPI_MARA, "Clientdata
BAPI_MARAX, "Clientdatax
BAPI_MARC, "Plantdata
BAPI_MARCX, "Plantdatax
BAPI_MAKT, "Material description
BAPI_MBEW, "VALUATION DATA
BAPI_MBEWX,
BAPI_MARM,
BAPI_MARMX,
bapi_mean,
BAPIRET2. "Return messages
DATA:V_FILE TYPE STRING. "input data file
DATA:
BEGIN OF LSMW_MATERIAL_MASTER,
MATNR(018) TYPE C, "Material number
MTART(004) TYPE C, "Material type
MBRSH(001) TYPE C, "Industry sector
WERKS(004) TYPE C, "Plant
MAKTX(040) TYPE C, "Material description
DISMM(002) TYPE C, "Extra Field Added In the Program as itsrequired
MEINS(003) TYPE C, "Base unit of measure
MATKL(009) TYPE C, "Material group
SPART(002) TYPE C, "Division
LABOR(003) TYPE C, "Lab/office
PRDHA(018) TYPE C, "Product hierarchy
MSTAE(002) TYPE C, "X-plant matl status
MTPOS_MARA(004) TYPE C, "Gen item cat group
BRGEW(017) TYPE C, "Gross weight
GEWEI(003) TYPE C, "Weight unit NTGEW(017) TYPE C, "Net weight
GROES(032) TYPE C, "Size/Dimensions
MAGRV(004) TYPE C, "Matl grp pack matls
BISMT(018) TYPE C, "Old material number
WRKST(048) TYPE C, "Basic material
PROFL(003) TYPE C, "DG indicator profile
KZUMW(001) TYPE C, "Environmentally rlvt
BSTME(003) TYPE C, "Order unit
VABME(001) TYPE C,
EKGRP(003) TYPE C, "Purchasing group
XCHPF(001) TYPE C, "Batch management
EKWSL(004) TYPE C, "Purchasing key value
WEBAZ(003) TYPE C, "GR processing time
MFRPN(040) TYPE C, "Manufacturer part number
MFRNR(010) TYPE C, "Manufacturer number
VPRSV(001) TYPE C, "Price control indicator
STPRS(015) TYPE C, "Standard price
BWPRH(014) TYPE C, "Commercial price1
BKLAS(004) TYPE C, "Valuation class
bwkey(004) type c,
END OF LSMW_MATERIAL_MASTER.
INTERNAL TABLE DECLARATIONS *
*to store the input data
DATA:
BEGIN OF it_matmaster OCCURS 0.
INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.
DATA:
END OF it_matmaster.
*for material description
DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
INCLUDE STRUCTURE BAPI_MAKT .
DATA:END OF IT_MATERIALDESC.
*FOR gross wt
data: begin of it_uom occurs 0.
include structure BAPI_MARM.
data:end of it_uom.
DATA: BEGIN OF IT_UOMX OCCURS 0.
INCLUDE STRUCTURE BAPI_MARMX.
DATA:END OF IT_UOMX.
data:begin of it_mean occurs 0.
include structure bapi_mean.
data:end of it_mean.
DATA:BEGIN OF IT_MLTX OCCURS 0.
INCLUDE STRUCTURE BAPI_MLTX.
DATA:END OF IT_MLTX.
*to return messages
DATA:BEGIN OF IT_RETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA:END OF IT_RETURN.
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1 .
AT SELECTION SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
TO UPLOAD THE DATA *
START-OF-SELECTION.
V_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = V_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = IT_MATMASTER
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ELSE.
*DELETE IT_MATMASTER INDEX 1.
ENDIF.
DATA POPULATIONS *
LOOP AT IT_MATMASTER.
*HEADER DATA
BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
BAPIMATHEAD-IND_SECTOR = IT_MATMASTER-Mbrsh.
BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
BAPIMATHEAD-BASIC_VIEW = 'X'.
BAPIMATHEAD-PURCHASE_VIEW = 'X'.
BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
*CLIENTDATA
BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
BAPI_MARA-DIVISION = IT_MATMASTER-SPART.
BAPI_MARA-DSN_OFFICE = IT_MATMASTER-LABOR.
BAPI_MARA-PROD_HIER = IT_MATMASTER-PRDHA.
BAPI_MARA-PUR_STATUS = IT_MATMASTER-MSTAE.
BAPI_MARA-ITEM_CAT = IT_MATMASTER-MTPOS_MARA.
BAPI_MARA-NET_WEIGHT = IT_MATMASTER-NTGEW.
BAPI_MARA-PO_UNIT = 'KG'.
BAPI_MARA-UNIT_OF_WT_ISO = 'KG'.
BAPI_MARA-UNIT_OF_WT = 'KG'.
BAPI_MARA-PACK_VO_UN = 'KG'.
BAPI_MARA-BASE_UOM_ISO = 'KG'.
bapi_mara-size_dim = it_matmaster-groes.
BAPI_MARA-MAT_GRP_SM = IT_MATMASTER-MAGRV.
BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
BAPI_MARA-BASIC_MATL = IT_MATMASTER-WRKST.
BAPI_MARA-HAZMATPROF = IT_MATMASTER-PROFL.
BAPI_MARA-ENVT_RLVT = IT_MATMASTER-KZUMW.
BAPI_MARA-PO_UNIT = IT_MATMASTER-BSTME.
BAPI_MARA-VAR_ORD_UN = IT_MATMASTER-VABME.
BAPI_MARA-PUR_VALKEY = IT_MATMASTER-EKWSL.
BAPI_MARA-MANU_MAT = IT_MATMASTER-MFRPN.
BAPI_MARA-MFR_NO = IT_MATMASTER-MFRNR.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-DIVISION = 'X'.
BAPI_MARAX-DSN_OFFICE = 'X'.
BAPI_MARAX-PROD_HIER = 'X'.
BAPI_MARAX-PUR_STATUS = 'X'.
BAPI_MARAX-ITEM_CAT = 'X'.
BAPI_MARAX-NET_WEIGHT = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-UNIT_OF_WT_ISO = 'X'.
bapi_maraX-size_dim = 'X'.
BAPI_MARAX-MAT_GRP_SM = 'X'.
BAPI_MARAX-OLD_MAT_NO = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-BASE_UOM_ISO = 'X'.
BAPI_MARAX-BASIC_MATL = 'X'.
BAPI_MARAX-MFR_NO = 'X'.
BAPI_MARAX-HAZMATPROF = 'X'.
BAPI_MARAX-ENVT_RLVT = 'X'.
BAPI_MARAX-PO_UNIT = 'X'.
BAPI_MARAX-PACK_VO_UN = 'X'.
BAPI_MARAX-VAR_ORD_UN = 'X'.
BAPI_MARAX-PUR_VALKEY = 'X'.
BAPI_MARAX-MANU_MAT = 'X'.
BAPI_MARAX-MFR_NO = 'X'.
*PLANT DATA
BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP.
BAPI_MARC-BATCH_MGMT = IT_MATMASTER-XCHPF.
BAPI_MARC-GR_PR_TIME = IT_MATMASTER-WEBAZ.
BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-BATCH_MGMT = 'X'.
BAPI_MARCX-GR_PR_TIME = 'X'.
*VALUATION DATA
BAPI_MBEW-PRICE_CTRL = IT_MATMASTER-VPRSV.
BAPI_MBEW-STD_PRICE = IT_MATMASTER-STPRS.
BAPI_MBEW-COMMPRICE1 = IT_MATMASTER-BWPRH.
BAPI_MBEW-VAL_AREA = IT_MATMASTER-BWKEY.
BAPI_MBEW-VAL_CLASS = IT_MATMASTER-BKLAS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-COMMPRICE1 = 'X'.
BAPI_MBEWX-VAL_AREA = IT_MATMASTER-BWKEY.
BAPI_MBEWX-VAL_CLASS = 'X'.
IT_MATERIALDESC-LANGU = 'EN'.
IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
append IT_materialdesc.
IT_UOM-GROSS_WT = IT_MATMASTER-BRGEW.
IT_UOM-ALT_UNIT = 'KG'.
IT_UOM-ALT_UNIT_ISO = 'KG'.
IT_UOM-UNIT_OF_WT = IT_MATMASTER-GEWEI.
APPEND IT_UOM.
IT_UOMX-GROSS_WT = 'X'.
IT_UOMX-ALT_UNIT = 'KG'.
IT_UOMX-ALT_UNIT_ISO = 'KG'.
IT_UOMX-UNIT_OF_WT = 'X'.
APPEND IT_UOMX.
it_mean-unit = 'KD3'.
append it_mean.
it_mltx-langu = 'E'.
it_mltx-text_name = it_matmaster-matnr.
APPEND IT_MLTX.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = BAPIMATHEAD
CLIENTDATA = BAPI_MARA
CLIENTDATAX = BAPI_MARAx
PLANTDATA = BAPI_MARc
PLANTDATAX = BAPI_MARcx
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA = BAPI_MBEW
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA =
SALESDATAX =
STORAGETYPEDATA =
STORAGETYPEDATAX =
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
IMPORTING
RETURN = IT_RETURN
TABLES
MATERIALDESCRIPTION = IT_MATERIALDESC
UNITSOFMEASURE = IT_UOM
UNITSOFMEASUREX = IT_UOMX
INTERNATIONALARTNOS = it_mean
MATERIALLONGTEXT = IT_MLTX
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
read table it_return with key TYPE = 'S'.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
*else.
*CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
RETURN =
endif.
WRITE:/ IT_RETURN-TYPE,
2 IT_RETURN-ID,
22 IT_RETURN-NUMBER,
25 IT_RETURN-MESSAGE.
IT_RETURN-LOG_NO,
IT_RETURN-LOG_MSG_NO,
IT_RETURN-MESSAGE_V1,
IT_RETURN-MESSAGE_V2,
IT_RETURN-MESSAGE_V3,
IT_RETURN-MESSAGE_V4,
IT_RETURN-PARAMETER,
IT_RETURN-ROW,
IT_RETURN-FIELD,
IT_RETURN-SYSTEM.
ENDLOOP.[/code]
Reward if useful.
Dara.

Similar Messages

  • ISSUE:regarding production version tab of MRP4 of  data transfer using BD10

    Hi all,
    This is regarding production version tab of MRP4 of  data transfer using ALE idoc (BD10).
    When i transfer the data using BD10 the production version is received at receiving end through segment
    but not created in MRP4 view tab.An error is coming as-
    "You wanted to maintain the master record of the material AB_06.04.09(2). However, it is already being processed by the user EBGABAP and is therefore locked."
    I logged in as-EBGABAP
    Please help me resolve the issue.
    Thanks
    Edited by: sanu debu on May 6, 2009 11:08 AM
    Edited by: sanu debu on May 6, 2009 11:09 AM
    Edited by: sanu debu on May 6, 2009 11:11 AM

    >
    sanu debu wrote:
    > Hi,
    > I have to upload production version tab data of  MRP4 view(MM01).Please suggest a function  moduleor bapi  for the same.
    >
    > Thanks.
    >
    > Edited by: sanu debu on May 6, 2009 3:24 PM
    BAPI_MATERIAL_SAVEDATA can be used, populate the respective fields in input parameter PLANTDATA

  • Does the data transfer used in the back up in time capsule included in the data allowance from my service provider?

    Is the data transfer used in the backup with airport time capsule included in the data allowance with my service provider?

    gheefromsa wrote:
    I am using Ethernet cable to connect TC to the modem. I am only backing up my mac book air within range of the TC. So I guess it will be OK from your reply. As a trial I did interrupt the back up by turning off the TC, disconnecting the Ethernet cable, turning TC back on. The mac would not connect wirelessly with the TC without the Ethernet connection.
    It is not using ISP .. absolutely for sure. Well 99.999%.. absolute tends to be only in maths.
    But you did the test wrongly.. I said to disconnect the modem.. during the backup.. not turn off the TC.. obviously once interrupted the TC will not work again until everything is plugged in.. but it will work even bridged for a short time.. just unplug the WAN port from the modem.
    The test is moot now.. as I can give you a 99.999% promise it is not using ISP.

  • How can forbid changing data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?

    I am using BAPI  'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.
    But this BAPI also can be used for change mode.
    How to forbid the change of MAT data when use this BAPI?
    TKS a lot~~
    I am looking foward to your response~~~

    you have to find out what the user did before your program goes ahead and starts the BAPI.

  • Data tranfer using bapi(lsmw)

    please explain the steps that are used to upload legacy data into sap using lsmw (bapi method)
    Message was edited by:
            neela renganathan

    Hi,
      is step by step process .
    Step-by-Step Guide for using BAPI in LSMW
    Note! The screen prints in this article are from ECC 5.0. They may differ slightly in other versions.
    Introduction:
    This document details the usage of BAPI in LSMW. We have used the example of migration of the purchase order data into SAP.
    Pre-requisites:
    It is assumed that the reader of this article has the minimum knowledge required on the Business Object, BAPI, Message Types and IDoc Types.
    Step-by-Step Procedure:
    Details of the BAPI used in this scenario:
    Business Object: BUS2012
    Method: CreateFromData
    Details of Message Type and Basic IDoc Type:
    Message Type: PORDCR
    Basic IDoc Type: PORDCR02
    Let’s have a look at the BAPI first, before proceeding to the LSMW:
    1. Go to Transaction BAPI
    2. Click on Search Button
    3. Enter the value “BUS2012” and select “Obj.type(Technical Object Name”
    4. Press ENTER
    5. Following screen appears:
    6. On the left side of the screen, Expand the “PurchaseOrder”.
    7. Select “PurchaseOrder” and double-click on the same for details.
    Building LSMW using BAPI:
    1. Go to Transaction LSMW.
    2. Enter the Project, Subproject and Object information and click on CREATE.
    3. Enter the descriptions for Project, Subproject and Object as prompted.
    4. Now select Settings à IDoc Inbound Processing
    5. “IDoc Inbound Processing” screen appears. Enter the required details as shown below:
    6. Click on “Activate IDoc Inbound Processing”.
    7. Click on “Yes” when prompted for “Activate IDoc Inbound?”
    8. Hit on “Back” to return to the main screen.
    9. Click on Continue (F8). Following Screen appears:
    10. Select the Step 1 “Maintain Object Attributes” and select “Execute”.
    11. Select the radio button “Business Object Method” and enter the following details:
    Business Object: BUS2012
    Method: CreateFromData
    Hit ENTER
    12. Save and click on BACK button. Following information message is displayed.
    13. Now select step 2 “Maintain Source Structures” and click “Execute”.
    14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
    Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on “Create” again to create the child structure. Following popup appears:
    Select “Lower Level” and click on Continue. Enter the Item data structure name.
    Click Save and hit BACK button to go to the main screen.
    15. Select step 3 “Maintain Source Fields” and hit execute.
    16. Enter the fields as shown below:
    17. Click SAVE and return to main screen.
    18. Select step 4 “Maintain Structure Relations” and click Execute.
    Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
    Select HEADERDATA and hit ENTER
    Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
    Click Save and return to main screen.
    19. Select the step “Maintain Field Mapping and Conversion Rules” and click on execute. Maintain the Field Mapping as seen below:
    20. Select step 7 “Maintain Source Files” and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
    Save and return to main screen.
    21. Select the step “Assign Files” and click on Execute.
    Assign the file provided to the source structure. Here the same file is provided for both the structures.
    Save and return to the main screen.
    22. Select the step “Read Data” and click on Execute.
    Click on Execute.
    Return to the main screen.
    23. Select the step “Display read data” and click on execute.
    Click on the structure name to get the field level values.
    24. Return to main screen and now select “Convert Data”.
    25. Return to the main screen and select “Display Converted data”.
    26. Return to main screen and select “Start IDoc generation”.
    27. Now select the step “Start IDoc Processing” on the main screen.
    28. Return to main screen and click on “Create IDoc overview”. Here the data record and status records of the IDoc could be viewed:
    Please Go through these Links ,
    BAPI with LSMW
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
    For document on using BAPI with LSMW, I suggest you to visit:
    http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
    http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    Regards

  • How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?

    I am using BAPI  'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.
    But this BAPI also can be used for change mode.
    How to forbid the change of MAT data when use this BAPI?
    TKS a lot~~
    I am looking foward to your response~~~
    Edited by: lorryhappy on Dec 22, 2009 11:35 AM

    Hi
    You can achieve it in another way..
    Before Passing Data to BAPI , Check whether the material is existing or not..
    If material is existing (Present in Material Master Tables e.g. MARA ) using
    data: l_matnr like mara-matnr.
    Select single matnr from mara into l_matnr.
    IF sy-subrc EQ 0.
    " Material is existing ==> Do Not Pass to BAPI
    else.
    " Material is NOT existing ==> Pass to BAPI for creation.
    endif.
    Repeat above logic for every material in batch..
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Data Transfer using LSMW IDOC processing with multiple segments

    we need to post the document data (Header structure, BP item structure, G/L item structure..etc) using LSMW IDOC processing.
    is it possible to transfer data for all these structures (Segments) in single file?

    Thanks for the reply.
    I am assuming when we are specifying the file in LSMW we are going to give the option to generate the file with include all structures.
    could you please elaborate further is there any thing specific we need to do while configuring LSMW to get the file for all segments in the IDOC with field names which we are going to populate with data, so that we can use it for data transfer.
    any help document will  be helpful.

  • ISU Business Partner Master data Upload using BAPI?

    Hi Experts,
    I used BAPI "BAPI_ISUPARTNER_CREATEFROMDATA" to upload ISU Business Partner master data.
    This BPAI is not uploading the following topics:
    1. Communication Address like Telephone,extension, email and etc., are not uploading.
    2. Middle name, nick name etc, the field which are under the Expand symbol not uploading.
    3. Reference customer also not uploading.
    strctures what I used are:
    for communication : TELEFONDATANONADDRESS, E_MAILDATANONADDRESS
    general data : BAPIISUBPD
    Reference customer: BAPIBPPARA-MUSTER_KUN
    I am passing all the data but not uploading some of the field values (above) using that BAPI.
    Could you please let me know the solution?
    Please help me out!
    Thanks in advance.
    sekhar

    Sekhar:
    Try with below details:
    for communication : BAPIISUBPA & BAPIISUBPAX.
    general data : BAPIISUBPD & BAPIISUBPDX
    Reference customer: BAPIISUBPA-BP_EXT & BAPIISUBPDX-BP_EXT
    Thanks,
    Murali.

  • Data transfer using dblink

    I am transfering the data from Mysql database to Oracle 11gR2. I using a control table( here temp_tab ) to maintain the details of the source and target table and dblink info.
    Also p1 is the procedure used for data transfer. My problem is
    1) I am not able to move data for some of the MSQL tables as they have text columns. The text columns cannot be queried and inserted in oracle database. tables The whole insert
    fails. The work around can be to use column names in select through which i am inserting data ( i can give null as <columnname> ) so that i can get text field as null for now.
    But the problem is if i hard code the values in select dynamic character of code is destroyed.
    2) I wanna use bulk collect in my code so that if one records fails the whole data of table doesnot fail. So that save exception can be used for record failure.
    Can anyone suggest a work aroung in this code.
    temp_tab
    ================================
    source_tab     target_tab          dblink
    aaa@dblink     aaa1               dblink name
    bbb@dblink     bbb1               dblink name
    ccc@dblink     ccc1               dblink name
    procedure p1 is
         cursor cursor_tab is select * from temp_tab;
    begin
         for cur in cursor_tab
         loop
              begin
                   EXECUTE IMMEDIATE 'insert into ' || cur.target_tab || ' select * from ' || cur.source_tab;
              exception
                   when other then
                        dbms_output.put_line(' the error is :: ' || sqlerrm(sqlcode));
              end;
         end loop;
    end p1;

    What in your code is dynamic and requires native dynamic SQL?
    Cursor FOR Loops have been obsolete in the Oracle database for more than 12 years ... why are you using one and why are you using a loop at all?
    It appears that all you have, and require, is INSERT INTO ... SELECT * FROM.
    You source table definition does not reference or use a database link. Why?

  • How do I "Init without data transfer' using 7.0 transformations and DTP's?

    I have a data-mart situation where I have a standard DSO object that sends deltas up to a standard cube.  This data flow is created with 7.0 transformation and a delta type DTP and has been running fine.
    I now have a new single activated request loaded to the DSO object but I DO NOT want this request to delta update to the cube. In 3.x, I used to go into the init infopackage, manually delete the initialization pointer, and run a 'Initialize Without Data Transfer' to make this work.  Deltas could then continue as before. 
    I do not see a way to do this using 7.0 transformations and DTP's.  I want to reset the init from DSO to cube so this request does not get updated.  Does anyone have step by step ideas on how this can be accomplished?
    Thanks in advance for any help on this issue.

    Hi,
    delete the data in the cube by using oprtion selective deletion based on request number.
    (if delta request is deleted from cube, with next load last delta records will also come)
    in this scenario there is no need to delete initiaizations option.
    in BI 7.0, initialization load is not there.
    see below documentation on DTP in SAP help.
    "On the Extraction tab page, specify the parameters:
    a.      Choose Extraction Mode.
    You can choose Delta or Full mode.
    In contrast to a delta transfer with an InfoPackage, an explicit initialization of the delta process is not necessary for the delta transfer with a DTP. When the data transfer process is executed in delta mode for the first time, all existing requests are retrieved from the source and the delta status is initialized. "
    Link: [http://help.sap.com/saphelp_nw70/helpdata/EN/42/f98e07cc483255e10000000a1553f7/frameset.htm]
    Regards
    Daya Sagar

  • Batch data commmunication using BAPI

    Hi,
    I am new to abap. I can do BDC using direct input and batch session.Now I am  want to do that using BAPI. can anyone explain me how do we do this with a detailed description or provide me link from where I can learn this concept.
    Regards,
    Vijay

    A BAPI is just a function module, so if you know how to call a function module, then you know how to call a BAPI.  BAPIs are use to wrap business logic, usually a complete business object, like "Create Sales Document".  You need to understand the interface of the BAPI to know what it will need to process.  You can check out documentation about the BAPIs in the Bapi browser, transaction BAPI.  Do you have a specific BAPI that you are looking to use?  What transaction are you doing using BDC, there may or may not be a corresponding BAPI.
    Regards,
    Rich Heilman

  • Data transfer using ALE/IDOC into XML.

    Dear All,
    I have to transfer FI document data (FB01) from the sap system ,convert it into XML and dump it in 1 of the file servers.I want to do this using ALE/IDOC.Is it possible to do the same and how.Similarly i want to do the same for Vendor and Customer master i.e sending the data in XML format.
    Kindly Suggest how do i go about doin the same..Its very urgent.Please help.
    Thanks & Regards,
    Lailu Philip.

    In continuation:
    Example Purchasing & Selling scenario
    We will develop a custom IDoc to carry the billing number from the Service Receiver’s system to the Service Provider’s system. We will populate the IDoc in a user exit on the sending side and we will process the transaction on the receiving side using a custom function module and a BDC transaction call.
    No rule conversion, segment filtering or version conversion will be implemented in the model as described in Figure 1.
    Requirements
    • Working ALE environment - See ALE Basis Configuration Guide;
    • ALE scenario design together with the business requirement;
    • Development access; and
    • ALE configuration access.
    NOTES:
    1. All IMG references to transactions are located in the transaction SALE which is the ALE portion of the IMG
    2. This is one way of developing a scenario where no message control exists. If message control exist (EG. On purchase orders) then NAST can be used to call an outbound function module that would create the required IDocs.
    3. Extensive knowledge of IDocs and ALE basis configuration is required in order to understand this guide.
    2. OUTBOUND PROCESSING
    2.1. Create IDoc type (WE30) Client independent
    The IDoc type refers to the IDoc structure that you will require for your development. In our case the IDoc type is called ZINVRV01. This IDoc type will have 1 segment called Z1INVRV with 2 fields, LIFNR & XBLNR, in this segment. If you require many segments or nested segments then they are also created using the same procedure.
    We will create the IDoc of the following structure:
    ZINVRV01
    Purchasing and Selling - Invoice receipt reversal
    Z1INVRV P&S - Segment 1
    Segment fields
    LIFNR Vendor account number
    XBLNR Reference document number
    Figure 3: IDoc type ZINVRV01
    To create the IDoc type, follow these next few steps:
    • Enter transaction WE30 (ALE -> Extensions -> IDoc types -> Maintain IDoc type)
    • Type in ZINVRV01 and click on Basic IDoc type, click the Create icon
    • Click on Create new (we are creating an IDoc from scratch but you may want to copy another IDoc if it is similar to your requirements) and enter a description, and press enter
    • Click on ZINVRV01 and then on the Create icon
    • Enter Z1INVRV as the segment type (must start with Z1), check mandatory if the segment must exist (in this case check it), enter 1 in minimum number and 1 as maximum number. (Make the maximum number 9999999999 if there are going to be many of these segments in each IDoc. IE. When line items are passed via IDocs), click on Segment editor
    • Enter a description for your segment type and create
    • Enter a description for your segment, enter each field required in your IDoc, in our case type LIFNR across for Field name, DE structure and DE documentation, repeat for XBLNR and press enter to validate.
    • Save and generate, press back
    • To release the segment choose Goto, Release from the menu
    • Check the box on the line of your new segment
    • Save, back and enter
    • Your IDoc type structure should be displayed with your new segment
    • Save and back
    • To release the IDoc type choose Extras, Release type from the menu and Yes
    Your IDoc is now ready for use. If you need to add fields or segments to your IDoc type, you will need to cancel the release of the IDoc type as well as the segment release using a similar procedure followed above (except now you uncheck the release box for the segment and you choose cancel release for the IDoc type).
    2.2. Create message type (WE81) Client independent
    To create a new message type, follow these next few steps:
    • Enter transaction WE81 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Create logical message type)
    • Choose Create logical message type by double clicking on it
    • Click on change icon to enter change mode
    • Click on New entries to add a new type
    • Enter the required message type, in our case it is ZINVRV and an appropriate description
    • Save and exit.
    Your message type has now been created. The next step will be to link it to the IDoc.
    2.2.1. Link message to IDoc type (WE82 & BD69) Client independent
    To link the message type to the IDoc type follow these next few steps:
    • Enter transaction WE82 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> EDI: Message Types and Assignment to IDoc Types)
    • Click on change icon to enter change mode
    • Click on New entries to create the link
    • Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    • Save and exit
    • Enter transaction BD69 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Assign message type to IDoc for ALE)
    • Click on change icon to enter change mode
    • Click on New entries to create the link
    • Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    • Save and exit
    Your IDoc is now linked to your message type. We still need to link object types and add the message to the model before we can use the message.
    2.2.2. Maintain object type for message type (BD59) Client independent
    The ALE objects are used to create links between IDocs and applications objects, to control the serialisation, to filter messages in the customer model and to use listings.
    For our own message type and IDoc you must maintain object types for the links.
    If you want to check the serialisation for the message type, then you must maintain object types for the serialisation. If no serialisation object has been maintained for a given message type, then the serialisation will not be checked for this message type.
    To add an object type to our message type, follow these next few steps:
    • Enter transaction BD59 (ALE -> Extensions -> ALE object maintenance -> Maintain object types)
    • Type in your message type ZINVRV and press enter
    • Click on New entries
    • Enter your object type, LIFNR (We need to use the vendor as a filter object), the segment name where LIFNR resides, Z1INVRV, a number 1 for the sequence followed by the actual field name LIFNR
    • Save and exit.
    You have now created an object that we’ll use as a filter object in the customer model to direct the flow of messages to the various logical systems based on the vendors in the filter of the message type ZINVRV.
    We now need to add our new message type to the distribution model.
    2.3. Configuring the Distribution Model
    This task is performed on your ALE reference client.
    2.3.1. Manual Configuration (BD64) Client dependent
    To manually configure the customer distribution model, read the ALE configuration procedure, and follow these steps:
    • Perform the Maintain customer distribution model directly function. (ALE -> Distribution customer model -> Maintain customer distribution model directly)
    • Specify the customer model you want to maintain and the logical system that is to be the sender of the messages OR create a new model. (Create model ALE with logical system ALELS1C400)
    • Choose the receiving systems to which the sending system must forward message type ZINVRV to.
    • For each receiving logical system allocate the message type necessary for communication to the receiving systems as per ALE configuration procedure.
    • Create filter objects (in our case LIFNR as the object type with the associated vendor number, 0000018001 with leading zeros, in the object area) for the message types.
    • Save the entries.
    NOTES:
    You cannot maintain a message type between the same sender and receiver in more than one customer distribution model.
    Only the owner is authorised to modify the model.
    To change the owner of a model, choose the 'Maintain ownership of customer distribution model' function. Make sure that all changes will be distributed to all systems that know the corresponding model. To do so, you can use the correction and transport system.
    To transport the customer distribution model you should use the Distribute customer model function of the IMG as described below.
    2.3.2. Distribute customer model (BD71) Client dependent
    After the customer model has been created centrally, it must be distributed to the other remote systems. This entails first of all setting up the communication for the distributed systems and then sending the model.
    2.3.2.1. Distribute Model (BD71) Client dependent
    This task is performed on your ALE reference client. To distribute the customer distribution model, read the ALE configuration procedure and follow these steps:
    • Make the settings for the communication with the other decentral systems, you have not set them yet.
    • Define the RFC destination for R/3 connections whose names correspond to the name of the corresponding logical system.
    • Create the output partner profile.
    • Distribute the customer model
    • Specify the name of the customer model.
    • You must specify the target system to which you want to distribute the customer model.
    • You must repeat this function for every distributed logical system.
    2.3.2.2. Maintain sending system partner profile (WE20) Client dependent
    With this function, you define the partner profiles for all outbound and inbound messages on the basis of the customer distribution model.
    After you have defined and distributed the customer model, you will have to maintain the partner profiles locally. To do this read the ALE configuration procedure.
    • Enter the output mode (background, immediately) and the package size for outbound processing.
    Requirements
    • The customer model must be maintained.
    • RFC destinations must be maintained.
    • The customer model must be distributed.
    • To ensure that the appropriate persons in charge are informed if a processing error occurs, you must make settings in: Error processing Maintain organisational units.
    2.4. Populate & distribute IDoc using ABAP
    An IDoc consists of a control record with structure edidc and one or more data records with structure edidd. The control record contains the sender and recipient of the IDoc, as well as information on the type of message.
    To be able to pass an IDoc to the ALE layer, you must set up a field string with structure edidc and an internal table with structure edidd. They are used to call function module master_idoc_distribute, which performs the save to the database and triggers the dispatch if necessary.
    2.4.1. Example code
    The code displayed below does the following:
    • populates our IDoc segment Z1INVR with the 2 fields XBLNR and LIFNR, populates the segment name and appends this to an internal table used to store the IDoc data;
    • populates the control record info with the message type and IDoc type; and
    • calls the MASTER_IDOC_DISTRIBUTE function module which distributes the IDoc as configured in the customer distribution model.
    Data declaration statements
    DATA: C_INVREV_SEGNAME(7) TYPE C VALUE 'Z1INVRV',
    C_INVREV_MESTYPE(6) TYPE C VALUE 'ZINVRV',
    C_INVREV_IDOC_TYPE(8) TYPE C VALUE 'ZINVRV01',
    Z1INVRV LIKE Z1INVRV,
    C_INVREV_DOCTYPE LIKE BKPF-BLART VALUE 'YY',
    IDOC_CONTROL LIKE EDIDC,
    T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
    IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    Move the document header into a structure
    LOOP AT DOC_HEAD_TAB INTO DOC_HEAD.
    ENDLOOP.
    Move the document item data into a structure
    LOOP AT DOC_ITEM_TAB INTO DOC_ITEM WHERE NOT ( LIFNR IS INITIAL ).
    ENDLOOP.
    Populate the IDoc segment’s field with the required data
    CLEAR Z1INVRV.
    Z1INVRV-LIFNR = DOC_ITEM-LIFNR. “Store vendor number for filter
    Z1INVRV-XBLNR = DOC_HEAD-XBLNR. “Billing number
    IDOC_DATA-SEGNAM = C_INVREV_SEGNAME. “Segment name
    IDOC_DATA-SDATA = Z1INVRV. “Segment data
    APPEND IDOC_DATA. “Populate IDoc internal table
    Move the control data info required for the distribution
    IDOC_CONTROL-MESTYP = C_INVREV_MESTYPE.
    IDOC_CONTROL-DOCTYP = C_INVREV_IDOC_TYPE.
    Call the distribute function with the required parameters
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
    EXPORTING
    MASTER_IDOC_CONTROL = IDOC_CONTROL
    TABLES
    COMMUNICATION_IDOC_CONTROL = T_COMM_CONTROL
    MASTER_IDOC_DATA = IDOC_DATA
    EXCEPTIONS
    ERROR_IN_IDOC_CONTROL = 1
    ERROR_WRITING_IDOC_STATUS = 2
    ERROR_IN_IDOC_DATA = 3
    SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
    OTHERS = 5.
    Figure 4: Outbound processing example code
    NOTE:
    For debugging purposes, use transaction WE05 (IDoc overview) to see check your IDoc status, or to see whether an IDoc was created/
    3. INBOUND PROCESSING
    3.1. Create Function Module
    This function module is called when a message type, of type ZINVRV, comes into the receiving system. This needs to be configured and is dealt with later in this section. The function module is passed the IDoc as a parameter.
    Example parameters
    Import parameters Reference field Opt Y/N
    INPUT_METHOD BDWFAP_PAR-INPUTMETHD N
    MASS_PROCESSING BDWFAP_PAR-MASS_PROC N
    Export Parameters Reference field Opt Y/N
    WORKFLOW_RESULT BDWFAP_PAR-RESULT N
    APPLICATION_VARIABLE BDWFAP_PAR-APPL_VAR N
    IN_UPDATE_TASK BDWFAP_PAR-UPDATETASK N
    CALL_TRANSACTION_DONE BDWFAP_PAR-CALLTRANS N
    Table Parameters Reference field Optional Y/N
    IDOC_CONTRL EDIDC
    IDOC_DATA EDIDD
    IDOC_STATUS BDIDOCSTAT
    RETURN_VARIABLES BDWFRETVAR
    SERIALIZATION_INFO BDI_SER
    Exceptions
    WRONG_FUNCTION_CALLED
    Example code
    The code displayed below does the following:
    • populates a BDC table with the IDoc info;
    • calls the transaction via a BDC call; and
    • updates the IDoc status according to the BDC error status.
    EXTRACT FROM: Z_IDOC_INPUT_ZINVRV
    Declaration of local variables
    DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.
    *-Loop through the IDOCs
    LOOP AT IDOC_CONTRL.
    *---Loop through the data for the IDOC
    LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
    CASE IDOC_DATA-SEGNAM.
    WHEN C_SEGNAM.
    Here we get the info from the idoc table
    IT_Z1INVRV = IDOC_DATA-SDATA.
    ENDCASE.
    PERFORM REV_INV.
    ENDLOOP.
    PERFORM UPDATE_IDOC_STATUS.
    ENDLOOP.
    FORM REV_INV "Reverse invoice form
    Local variables & constants
    DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'. "BDC transaction code
    Now we can build the bdc table to call the reversal transaction start of screen 109
    CLEAR BDC_TAB.
    BDC_TAB-PROGRAM = 'SAPMV60A'.
    BDC_TAB-DYNPRO = '109'.
    BDC_TAB-DYNBEGIN = 'X'.
    APPEND BDC_TAB.
    Document number
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.
    BDC_TAB-FVAL = IT_Z1INVRV-XBLNR. "Billing document number
    APPEND BDC_TAB.
    OK Code for screen 109
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'BDC_OKCODE'.
    BDC_TAB-FVAL = 'SICH'.
    APPEND BDC_TAB.
    Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale. The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.
    CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.
    Store the return code for use in another form (status update)
    RETURN_CODE = SY-SUBRC.
    Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.
    IF SY-SUBRC NE 0.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    GROUP = 'ZINVRV'
    USER = C_ALE_USER
    KEEP = 'X'.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = C_TCODE
    TABLES
    DYNPROTAB = BDC_TAB.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    NOT_OPEN = 1
    QUEUE_ERROR = 2
    OTHERS = 3.
    ELSE. "No problems
    C_EXISTS = 'N'.
    Select from the billing document table to get sales doc number
    SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.
    Select from the sales document table to get user status number
    SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND
    POSNR = VBRP-AUPOS.
    Select from the status table to change the user status to pending
    SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND
    STAT LIKE C_USER_STATUS.
    IF JEST-STAT = C_US_PENDING. "User status is pending
    JEST-INACT = C_UNCHECKED. "Make pending the active status
    UPDATE JEST.
    C_EXISTS = 'Y'. "I.E. An entry is already in table
    ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.
    JEST-INACT = C_CHECKED. "Make everything else inactive
    UPDATE JEST.
    ENDIF.
    ENDSELECT.
    IF C_EXISTS = 'N'. "I.E. Pending has never been a status before
    JEST-OBJNR = VBAP-OBJNR.
    JEST-STAT = C_US_PENDING.
    JEST-INACT = C_UNCHECKED. "Make pending the active status
    INSERT JEST.
    ENDIF.
    ENDSELECT. "Select from VBRP (Billing document table)
    ENDIF.
    ENDFORM. " REV_INV
    FORM UPDATE_IDOC_STATUS.
    Now we check the CALL TRANSACTION return code and set IDOC status
    CLEAR IDOC_STATUS.
    IF RETURN_CODE = 0.
    WORKFLOW_RESULT = '0'.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IDOC_STATUS-STATUS = '53'.
    IDOC_STATUS-UNAME = SY-UNAME.
    IDOC_STATUS-REPID = SY-REPID.
    IDOC_STATUS-MSGTY = SY-MSGTY.
    IDOC_STATUS-MSGID = SY-MSGID.
    IDOC_STATUS-MSGNO = SY-MSGNO.
    IDOC_STATUS-MSGV1 = SY-MSGV1.
    IDOC_STATUS-MSGV2 = SY-MSGV2.
    IDOC_STATUS-MSGV3 = SY-MSGV3.
    IDOC_STATUS-MSGV4 = SY-MSGV4.
    RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    ELSE.
    WORKFLOW_RESULT = '99999'.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IDOC_STATUS-STATUS = '51'.
    IDOC_STATUS-UNAME = SY-UNAME.
    IDOC_STATUS-REPID = SY-REPID.
    IDOC_STATUS-MSGTY = SY-MSGTY.
    IDOC_STATUS-MSGID = SY-MSGID.
    IDOC_STATUS-MSGNO = SY-MSGNO.
    IDOC_STATUS-MSGV1 = SY-MSGV1.
    IDOC_STATUS-MSGV2 = SY-MSGV2.
    IDOC_STATUS-MSGV3 = SY-MSGV3.
    IDOC_STATUS-MSGV4 = SY-MSGV4.
    RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    ENDIF.
    APPEND IDOC_STATUS.
    ENDFORM. " UPDATE_IDOC_STATUS
    Figure 5: Inbound processing example code
    3.1.1. Debugging inbound FM
    Use transaction WE19 to test inbound function module in debugging mode. Also use WE05 to view the IDocs and their statuses.
    3.2. Maintain ALE attributes
    The inbound function module needs to be linked to the message type and the message type needs to be linked to the appropriate inbound process code at the partner profile level before the scenario is enabled. These steps are described below in detail.
    3.2.1. Link Message Type to Function Module (WE57) Client independent
    To link a message (ZINVRV) type to a function module (Z_IDOC_INPUT_ZINVRV) follow these steps:
    • Enter transaction WE57 (ALE -> Extensions -> Inbound -> Allocate function module to logical message)
    • Select an entry (EG. IDOC_INPUT_ORDERS) and copy
    • Type in module name Z_IDOC_INPUT_ZINVRV
    • Type in basic IDoc type as ZINVRV01
    • Type in message type as ZINVRV
    • Type object type as IDOCINVOIC (Invoice document) - Used for workflow
    • Direction should be set to 2 for inbound
    • Enter and save
    3.2.2. Define FM settings (BD51) Client independent
    • Enter transaction BD51 (ALE -> Extensions -> Inbound -> Define settings for input modules)
    • Click on New entries
    • Type in the name of the new function module Z_IDOC_INPUT_ZINVRV
    • Enter 0 for mass processing in the output column
    • Save and Exit
    3.2.3. Maintain process codes (WE42) Client dependent
    A process code needs to be maintained on each client. It then needs to be linked to the message via the partner profiles on each client. This allows the various clients to use a unique function module for the same message type.
    To maintain the process code follow these steps:
    • Log on to the appropriate receiving system client
    • Execute WE42 (ALE -> Extensions -> Inbound -> Maintaining process codes inbound)
    • Choose Inbound with ALE service
    • Choose Processing with function module
    • Click on Processing with function module and choose create icon
    • Click on New Entries
    • Type in process code ZINR and give it a description and save
    • Now you are asked to Please maintain codes added in ALE entry methods, enter and choose Z_IDOC_INPUT_FIRVSL and copy it. You should choose a FM similar to your one.
    • Enter your process code ZINR
    • Enter your function module Z_IDOC_INPUT_ZINVRV
    NOTE: The next 6 steps are used in workflow error handling.
    • Enter IDPKFIDCMT in object type
    • Enter MASSINPUTFINISHED in End event
    • Enter IDOCINVOIC in IDoc object type
    • Enter INPUTERROROCCURREDFI in IDoc start event
    • Enter INPUTFINISHEDFI in IDoc End event
    • Enter IDOCINVOIC in Application object type
    You will need to determine the task associated with object IDOCINVOIC, and then assign the appropriate position to it. This position will then receive the application error messages via workflow.
    To set up the workflow area please consult the Workflow config guide.
    3.3. Create inbound partner profile
    For each message type you need to maintain the inbound partner profiles.
    3.3.1. Maintain receiving system partner profile (WE20) Client dependent
    To maintain inbound partner profiles read the document ALE configuration procedure:
    • Add the message type ZINVRV with process code ZINR.
    • Enter the output mode (background, immediately) for inbound processing and NO message code.
    • Enter the position S and choose the ALE administrator 50000085. This position will then receive all the technical ALE errors via workflow.
    3.4. Test
    Once the inbound function module has been debugged the scenario should be ready to test in its entirety. If problems occur, read through the relevant areas of this document to check your configuration or code.
    Hope this will help you,
    If you  want me to explain more, you can give me your email id.
    Reward with points incase you are satisfied.
    Regards,
    Sushama

  • Error in data transfer using CIF

    Hi all,
    I am just clueless. I am trying to transfer master data from ERP to EWM but it ain't happening. It is throwing out this error. System:    P6QCLNT800    User:  RFC_USER_1 12/11/2010
    Function/Q/SAPAPO/CIF_LOC_INBOUND
    Text:        Internal error in IGS2, US. RFC: Connection Error.
    All my settings and configs are right atleast as per SAP documentation for integrating EWM as an add on. I tried after disabling geocoders for US using the GEOCODERS report. Still I am getting, I have checked my RFC destination and tested my connection it is working fine in SM59. What should I do to proceed further?

    Hi Deepak,
    Following is the detail I could see:
    Cl.  User         Function Module                 Queue Name                Destination                       Date        Time
    100  SS813794     MCEX_UPDATE_11_QRFC        MCEX11           NONE              27.02.2014  05:33:02
    100  SS813794     MCEX_UPDATE_11_QRFC         MCEX11          NONE               02.03.2014  23:00:35
    Status                                              TID                       Host      Tran                  Program
    Transaction recorded                AC131B362DEC530F145E0001  IGTBILSA  VA01                  RSM13000
    Transaction recorded                AC131B362DEC5313FE630002  IGTBILSA  VA01                  RSM13000
    Both the queues which are seen are while I created a sales order in ECC.
    If I further double click, it will take me into FM and after clicking queue name 'MCEX11' I could see:
                        LUW Information
            TransID:         AC131B362DEC530F145E0001
            LUW-Cnt:         00000001
    Thanks,
    AP.

  • Master data transfer using CIF

    Hi all,
    I am just clueless. I am trying to transfer master data from ERP to EWM but it ain't happening. It is throwing out this error. System: P6QCLNT800 User: RFC_USER_1 12/11/2010
    Function/Q/SAPAPO/CIF_LOC_INBOUND
    Text: Internal error in IGS2, US. RFC: Connection Error.
    Here P6QCLNT800 is the target system and RFC destination and also the logical system for SCM EWM. User is the RFC user.
    All my settings and configs are right atleast as per SAP documentation for integrating EWM as an add on. I tried after disabling geocoders for US using the GEOCODERS report. Still I am getting, I have checked my RFC destination and tested my connection it is working fine in SM59. What should I do to proceed further?
    I posted this in SCM LE forum but I guess this post is more suitable here.

    85,
    This document tells me to create a RFC user with user type System. While I've created with the type communications.
    This shouldn't make much difference.  When I am debugging a new implementation I will make the USERID dialogue with SAP_ALL until all connectivity problems are resolved, then change the USERID to System (I have never used communications, although I do not doubt that it works) , and take away the excess authorization.  From the sound of it, the type of USERID may not be your problem.
    A common problem is the case sensitivity of passwords.  You usually get some kind of logon error message, though (with standalone SCM anyway).  When your userid is 'dialogue', and you execute SM59, and perform a remote logon, this will tell whether logon issues are still a problem.  I always set my passwords in the destination to all uppercase, since the CIF seems to capitalize PWs before it sends them across.
    does your document fit my case?
    Not exactly. Unfortunately, I have never set up EWM as an addon, so I can't speak from experience.  The instructions in your doc seem to mostly parallel the standard SCM connectivity docs though, so most of the steps are probably the same.
    Best Regards,
    DB49

  • COR2 (Change Process Order) Upload & Data Change Using BAPI OR RFC

    Dear Experts,
                       I want to change the Transaction cor2(Change Process Order) material 1st line quantity, after that i have to upload records from line 2. I have all the data in itab. Will you people please have a suggestion to change and Upload data at the same time in a single program using some BAPI or RFC.
    Which BAPI or RFC will be helpfull in this regards.
    Thanks,
    Sohail

    I have done it through BDC recording, change on first line, then upload using bdc from 2nd line.

Maybe you are looking for

  • Ipad deleted all the music on it's own.

    Listening to iPad and the music stopped playing. Tried to play anther song and there was no music on the iPad. It says "no items" when you go to a song list. The songs on the PC it was synced to disappeared as well. When you click any songs to play t

  • TS2771 how do i use messaging on the Ipod touch 4th generation?

    I need help is figuring out how to use messaging on the ipod touch 4th generation. I've updated to IOS 6  and still not able to figure it out. Help, Deanna

  • Solaris 8 CDE Configuration

    Hiya, Can anyone point me in the direction of the file that CDE's Style Manager updates to force the "home" session to be used on login (instead of the "current") ? (I'm in the process of constructing a Solaris 8 2/2 client build with a severly clamp

  • Access to Faces context

    Hello all, I am wondering how can I get access of faces context from POJO . Thanks.

  • Photoshop CS5 compatibility with windows 7 and windows 8

    Hello, I do not understand the technical side of computers - I just use them for my work as a photographer I have Photoshop CS5 32 bit installed on my PC with Vista home premium. I am buying a new PC with 64 bit Windows 7 installed, and it also has t