J1ID BDC

Dear frnds,
Iam unable to write the BDC code for J1ID t.code.
I have the data in XL sheet which consists vendor number and PAN number. I want to upload the PAN numbers  throough J1ID t.code.
So, i want the BDC program for J1ID t.code.
I have done BDC's for MM01 and XK01, z tbales also.
But i am getting problem in this one.
help me frnds.............it is new requirement for me..

ada

Similar Messages

  • J1id bdc- error

    Hi all,
            i'm doing BDC for J1ID, i'm not able to process . error is coming has
    J_1IGRXREF field lenght is loner then screen field. i've increased the lenght but still getting erro.
    REPORT  ZSPK_BDC
    *REPORT ZEXCISE_PROG
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA: BEGIN OF ITAB OCCURS 0,
          MATNR(20),
          WERKS(5),
          J_1ICHID(12),
          J_1ICAPIND(40),
          J_1IGRXREF(60),
          J_1IDECFLAG(2),
          J_1IDECDATE(10),
          END OF ITAB.
    DATA: BEGIN OF BDCDATA OCCURS 0.
            INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_GROUP(12) OBLIGATORY,
                KEEP AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK  B1.
    START-OF-SELECTION.
      PERFORM FETCH_DATA.
      IF NOT ITAB[] IS INITIAL.
        PERFORM INSERT_DATA.
      ENDIF.
    END-OF-SELECTION.
    *&      Form  FETCH_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM FETCH_DATA .
      DATA : I_FILE_TABLE TYPE  TABLE OF FILE_TABLE,
             L_FILETABLE  TYPE  FILE_TABLE,
             L_RC         TYPE  I,
             L_P_DEF_FILE TYPE  STRING,
             L_P_FILE     TYPE  STRING,
             L_USR_ACT    TYPE  I.
      L_P_DEF_FILE = 'C:\'.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
        EXPORTING
            WINDOW_TITLE            =
            DEFAULT_EXTENSION       =
             DEFAULT_FILENAME        =
            FILE_FILTER             =
            WITH_ENCODING           =
          INITIAL_DIRECTORY       = L_P_DEF_FILE
            MULTISELECTION          =
        CHANGING
           FILE_TABLE              = I_FILE_TABLE
           RC                      = L_RC
           USER_ACTION             = L_USR_ACT
            FILE_ENCODING           =
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          ERROR_NO_GUI            = 3
          NOT_SUPPORTED_BY_GUI    = 4
          OTHERS                  = 5      .
      IF SY-SUBRC = 0
            AND L_USR_ACT <>
            CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
        LOOP AT I_FILE_TABLE  INTO L_FILETABLE.
          L_P_FILE = L_FILETABLE.
          EXIT.
        ENDLOOP.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            FILENAME                      = L_P_FILE
           FILETYPE                      = 'ASC'
           HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                       = 'ibm'
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
          TABLES
            DATA_TAB                      = ITAB
          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.
        ENDIF.
      ENDIF.
    ENDFORM.                    " FETCH_DATA
    *&      Form  INSERT_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM INSERT_DATA .
      PERFORM OPEN_GROUP.
    LOOP AT ITAB.
      PERFORM BDC_DYNPRO      USING 'SAPMJ1ID' '0200'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RB1'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=EX'.
      PERFORM BDC_FIELD       USING 'RB11'
      PERFORM BDC_FIELD       USING 'RB1'
                                    'X'.
      PERFORM BDC_DYNPRO      USING 'SAPLJ1I5' '0020'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'J_1IMTCHID-MATNR(01)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=NEWL'.
      PERFORM BDC_DYNPRO      USING 'SAPLJ1I5' '0020'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'J_1IMTCHID-J_1IDECDATE(01)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-MATNR(01)'
                                     ITAB-MATNR.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-WERKS(01)'
                                     ITAB-WERKS.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-J_1ICHID(01)'
                                     ITAB-J_1ICHID.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-J_1ISUBIND(01)'
                                    'X'.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-J_1ICAPIND(01)'
                                     ITAB-J_1ICAPIND.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-J_1IGRXREF(01)'
                                     ITAB-J_1IGRXREF.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-J_1IDECFLAG(01)'
                                     ITAB-J_1IDECFLAG.
      PERFORM BDC_FIELD       USING 'J_1IMTCHID-J_1IDECDATE(01)'
                                     ITAB-J_1IDECDATE.
      PERFORM BDC_DYNPRO      USING 'SAPLJ1I5' '0020'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'J_1IMTCHID-MATNR(01)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_DYNPRO      USING 'SAPLJ1I5' '0020'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'J_1IMTCHID-MATNR(01)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=SAVE'.
      PERFORM BDC_DYNPRO      USING 'SAPLJ1I5' '0020'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'J_1IMTCHID-MATNR(02)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=BACK'.
      PERFORM BDC_DYNPRO      USING 'SAPLJ1I5' '0020'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'J_1IMTCHID-MATNR(02)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=BACK'.
      PERFORM BDC_DYNPRO      USING 'SAPMJ1ID' '0200'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/EEXIT'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'EXCISE'.
    ENDLOOP.
      PERFORM BDC_TRANSACTION USING 'J1ID'.
      PERFORM CLOSE_GROUP.
    ENDFORM.                    " INSERT_DATA
    *&      Form  OPEN_GROUP
          text
    FORM OPEN_GROUP.
      SKIP.
      WRITE: /(20) 'Create group'(I01), P_GROUP.
      SKIP.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          CLIENT = SY-MANDT
          GROUP  = P_GROUP
          USER   = SY-UNAME
          KEEP   = KEEP.
    WRITE: /(30) 'BDC_OPEN_GROUP'(I02),
             (12) 'returncode:'(I05),
                  SY-SUBRC.
    ENDFORM.                    "OPEN_GROUP
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_FIELD
    *&      Form  BDC_TRANSACTION
          Start new transaction                                          *
         -->tcode  transaction code                                      *
    FORM BDC_TRANSACTION USING TCODE.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE     = TCODE
        TABLES
          DYNPROTAB = BDCDATA.
    REFRESH BDCDATA.
    WRITE: /(25) 'BDC_INSERT'(I03),
                  TCODE,
             (12) 'returncode:'(I05),
                  SY-SUBRC.
    ENDFORM.                    "BDC_TRANSACTION
    *&      Form  CLOSE_GROUP
          end batchinput session                                         *
    FORM CLOSE_GROUP.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
    WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
             (12) 'returncode:'(I05),
                  SY-SUBRC.
      SKIP 1.
    endform.
    pls help me
    regards
    Suprith

    But in the standard table, the length is only 1. Check the table:J_1IMTCHID. In the table,it is only a single digit value.
    Number of Goods Receipts per Excise Invoice is the field name. So, it is only single digit not more than that.
    Check the order of the fields in the internal table and the the flat file are same. And debug the program to see if the correct values are coming.
    Vishwa.

  • How we can upload the data through BDC for transaction J1ID

    Hi guru
    How w can upload the data for Transaction J1ID.In this we want to upload the data for Customer Excise details. I want to upload the data on behalf of Customer (KUNNR) becasue customer is a primary KEY. Table name: J_1IMOCUST
    Fields. 11 Fields.plz provide some code logic.
    KUNNR     J_1IEXCD     J_1IEXRN     J_1IEXRG     J_1IEXDI     J_1IEXCO     J_1ICSTNO     J_1ILSTNO     J_1IPANNO     J_1IEXCICU     J_1ISERN

    Hi,
    I dont see any difficulties in doing BDC upload for J1ID, You have to record by giving the New Entries button and then enter all the details of customers using table control technique.
    SEARCH SCN for Table Control in BDC
    Regards
    Karthik D

  • BDC TO UPDATE J1ID

    GURU'S,
    I WISH TO UPDATE SOME RECORDS FOR J1ID.COULD U SUGESET WHICH steps to follow.
    Thanx in advance
    Regards,
    Vibhuti

    resolved

  • MIGO BDC is not working in  Scheduled BG Job

    Hello,
    For Subcontracting Purchase Order Item, we are using the BDC Call Transaction method for the TCode
    MIGO in the program  'ZMIGO_TEST'.
    When we are testing the Program 'ZMIGO_TEST' through SE38 it is running successfuly and document is also posted but problem is when we schedule the same program 'ZMIGO_TEST' in SM36, same BDC code for MIGO Transaction is not working and giving the Error in IST_BDCMSGCOLL as folloow.
    MSGID: - DC
    MSGTYP: - S
    MSGNR: - 006
    DYNAME: -  0001
    MSGV4: -  SAPLMIGO
    NOTE: - We can not use the BAPI 'BAPI_GOODSMVT_CREATE' because we have to update the Challan Number and Challan Year also for each PO Line Item and this BAPI does not have thses two fields in its Parameter Interface.
    Please suggest.
    Thanks & Regards
    Jagesh

    hi,
    check below tcodes..
    Subcontracting Process
    Subcontracting without Payment of Duty
    Creation of Subcontracting PO (ME21N) 
    Transfer Posting of Components to Subcontractor (Mvmt Type - 541) (MB1B/ME2O/MIGO) 
    Creation of Subcontracting Challan w.r.t. Transfer Posting Doc (J1IF01) 
    Goods Receipt w.r.t. Subcontracting PO and Refer Subcontracting Challan at the time of GR (MIGO) {GR with 101 and auto consumption of components with 543 movement} 
    Reconciliation of Subcontracting Challan (J1IFQ) 
    Completion of Subcontracting Challan (J1IF13) 
    Generation of Annexure IV (J1IFR) 
    Note: - In this case, you have to maintain the Assessable Value for the Components to be supplied to Vendor in J1ID and also Excise Tax rates for the Chapter IDs linked with these components. So during J1IF01, system will take the Assessable Value as Excise base Value and calculates the Excise Duties by taking Excise Tax Rates.
    Subcontracting under Full Payment of Duty
    Creation of Subcontracting PO (ME21N) 
    Transfer Posting of Components to Subcontractor (MB1B/ME2O/MIGO) 
    Creation of Outgoing Excise Invoice w.r.t. Transfer Posting Document (J1IS) - Used to send the components to Subcontractor's. Here 57F4 Challan is not created. 
    Accounting Entry: -
    CENVAT Input BED - Cr
    CENVAT Input ECS - Cr
    CENVAT Input ECS - Cr
    CENVAT Suspense A/c - Dr
    Capture Vendor Excise Invoice at the time of GR of Finished Goods w.r.t. Subcontracting PO (MIGO) 
    Post Excise Invoice for FG received from Subcontractor (J1IEX) 
    Accounting Entry: -
    CENVAT Input BED - Dr
    CENVAT Input ECS - Dr
    CENVAT Input ECS - Dr
    CENVAT Clearing A/c - Cr
    Master Data:-
    MM01- Material Masters for Components and FG 
    XK01 - Vendor Master (Subcontractor) 
    CS01 - BOM for FG 
    ME11 - Purchase Info record for Subcontracting

  • BAPI or FM for Material and ChapterID Combination(J1ID Transaction)

    Dear All,
                    I need BAPI or FM  for Creation of Material and ChapterID combination. I dont need for other options present in J1ID Transaction.
    I cannot use Insert statement  for Material and ChapterID  Creation  as it contains only few fields.
    Please let me know regarding this.
    Regards,
    Anilkumar

    Hello
    The bapi BAPI_INSPECTIONPLAN_CREATE is used for creation. There you can assign several materials through structure MATERIALTASKALLOCATION (BAPI1191_MTK_C). There is no bapi for modifications so you can assign other materials using LSMW or BDC as Gururaj told you or in this special case populate table MAPL directly (better talk to your ABAP to decide it); I did it without issues and I checked and the function CZ_VB_MAPL_POST could update the information you need (talk to your ABAP to validate it).
    Best regards
    Carlos Díaz

  • Bdc TO ENTER ecc no. for already created vendors

    Sir,
    I need to update or insert ECC no. in J1ID.
    I wish to create to BDC.Could u plz guide me the step by step process its urgent
    thanks & regards
    vibhuti

    Moved to ABAP Forum.
    Regards,
    RIch Heilman

  • BDC Error while executing in background

    Hello,
    I am run a BDC to upload Assessable value in J1ID transaction. When I am running the program in background it gives "Runtime error SAPSQL_ARRAY_INSERT_DUPREC has occurred" But when I am running the same in foreground mode it is running perfectly. Since the data volume is huge I cannot run the program in foreground. can anyone guide me how to correct the program to prevent background errors.
    Thanks,
    Anil N.

    Hi, ref SAP NOTE 668466
    When you load attributes or texts, data records are usually inserted in the master data tables of the characteristic using an array insert statement (P, Q, X, Y, T tables). This results in a SAPSQL_ARRAY_INSERT_DUPREC runtime error if data records that are to be inserted and that relate to the unique primary key of the relevant database table already exist in this table. The following possible reasons are currently known for the occurrence of the SAPSQL_ARRAY_INSERT_DUPREC runtime error:
    1. Data inconsistencies in the master data tables of the characteristic
    SAPSQL_ARRAY_INSERT_DUPREC runtime errors or RSDMD 199 may occur if the data appears in an inconsistent status in the master data tables of the characteristic before you load attributes or texts. Notes 323140, 566044, 592757 and 599269 describe this (among other things) in more detail.
    2. Parallel loading of nondisjunct data packages
    If master data attributes are loaded over several dialog processes that are running in parallel, you must guarantee that the data packages of the relevant request are strictly disjunct concerning the characteristic value. This means that all data records that belong to a certain characteristic value may only be contained in a single data package. If data records of a certain characteristic value are distributed over several data packages, this may cause conflicts during the parallel loading of these packages when the master data tables are accessed and this may result in SAPSQL_ARRAY_INSERT_DUPREC runtime errors.
    The same conditions that apply to loading attributes also apply to loading language-independent master data texts. If language-dependent texts are loaded in parallel, the data packages must be disjunct in relation to the combination of characteristic value and language indicator.
    Note 566044 also describes the problematic nature of nondisjunct data packages or duplicate or overlapping data records.
    3. Parallel loading of time-dependent attributes or texts
    When you load time-dependent attributes or texts, a data record that is to be loaded is assigned to a characteristic value and also specifically to a time interval within which the contained attribute values or texts are valid. For this reason, requests for loading time-dependent attributes or texts typically contain several data records for each characteristic value. If data records of a certain characteristic value or the combination of characteristic value and language indicator are distributed over several data packages, this may (as already explained) cause conflicts when the master data tables are accessed and may result in SAPSQL_ARRAY_INSERT_DUPREC runtime errors or error message RSDMD 199.

  • Rggarding upload data through BDC

    Hi guru,
    If anybody have BDC for uploading data for the transaction for J1ID (Customer Exicse Details) .
    then plz send me.
    Thanks

    hi,
       you could get BDC program automatically generated by SAP . Go to t-code SHDB do recording with your t-code after recording a session will be created .After selecting the session if you click the program button a Program will be automatically generated by SAP.Choose Radio button transfer from recording.
                                                                                    with regards,
                                                                                    M.Sreeram.

  • Upload Masters Thru J1ID

    I want to  upload Master CIN data Thru transaction J1ID , what is the best method to upload??
    I am using LSMW but it is very slow , so will i use BDC for it or is there any standard BAPI available for this tcode

    Hi Virendra,
    I think that your solution is very good for my purpose.
    But in my implementation there is no way to insert a new element in an existing WBS, I can only edit attributes for an element already created, for example, in cj02.
    I checked all the menus but i didn't find any useful command.
    Could you send me a screenshot of the keypoint in which you can create the element different from the first level?
    Thank you very much.
    Giorgio

  • Error while running a BDC for the Transaction F-02

    Hi,
           I'm getting an error <b><i>"Parking not possible during Batch Input"</i></b> while running a BDC for the transaction F-02.
           When i click on the error message it displays the message [b<i>]"In Customizing, you can control whether an error message is issued."</b></i>
            How to solve this issue?.
            Waiting for ur replies.........
    Regards
    N.Senthil

    Hi,
    When you are doing the recording in SHDB, and in the same screen where the TCODE to be recorded is given, there are options that you can choose called "Recording Parameters"...Select the checkbox which says "Not a Batch Input Session", this will set the sy-binpt variable to " "(in a recording by default it is "X")...and you will not get this error...
    Also make sure while writing the BDC program to make use of the "bdc options" parameter which has this property to switch of sy-binpt...
        Refer below theard for sample bdc code for f-02.
    https://forums.sdn.sap.com/click.jspa?searchID=5126766&messageID=1538409
    Regards

  • Unable to update the serial number through bdc in Sales Order

    Hi experts,
    I written the inboud FM for to update the 3rd party items serial number to the sales orders through BDC Call transaction Method.
    Here i am facing a problem when i have the 19 item Quan ,it is updating correct through idoc , when ever there is moe than 19 and at that if any serial number repeated for that if i am changing at that time it is loosing the control of the BDC and giving the control to the salesorder screen.
    how can i handle that control again has to come to BDC prgrm......
    Thnks,
    Regards,
    Bharani

    Hi,
    Can you please let me know the segment in ORDERS05 Idoc to process the Payment card information and if the standard Function Module can handle the creation of a Sales Order with data for Payment Card.
    We have a requirement to map the Tokenized Number of the Credit Card send from a store front end to ECC mapping via SAP-PI.
    Thanks in Advance,

  • MULTIPLE ITEM PROBLEM IN VL31N BDC

    hI FRIENDS ,
        I AM POSTING A BDC OF TRANSACTION VL31N ,ie FOR SCHEDULE AGREEMENT INBOUND DELIVERY.I CREATE A FUNCTIONAL MODULE OF THE SAME AND CALL IT FROM AN ASP PAGE,IN THAT THERE IS PO NUMBER 5500000986 WHICH HAS TWO ITEMES 62 AND 95 RESPECTIVLY OF SAME MATARIAL NUMBER R010230123041002 AND DIE NUMBER 2304P,NOW THE PROBLEM IS THIS BDC IS WORKING WHEN THERE IS ONLY ONE ITEM BUT GIVES AN ERROR "CANT CREAT INBOUND DELIVERY FOR PO NO ...' WNEN IT HAS MULTIPLE ITEM.WHAT SHOULD I DO ? I ALSO USED LOOP BUT IT ALSO DOSENT WORK AS IT WILL ADD ALL OPEN QTY OF PO 986 AND UPDATE AGAINST ITEM NO 95.
    CODE IS AS FOLLOWS:.........
    FUNCTION y_synie_bdcinbdly.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(CTU) LIKE  APQI-PUTACTIVE DEFAULT 'X'
    *"     VALUE(MODE) LIKE  APQI-PUTACTIVE DEFAULT 'N'
    *"     VALUE(UPDATE) LIKE  APQI-PUTACTIVE DEFAULT 'L'
    *"     VALUE(GROUP) LIKE  APQI-GROUPID OPTIONAL
    *"     VALUE(USER) LIKE  APQI-USERID OPTIONAL
    *"     VALUE(KEEP) LIKE  APQI-QERASE OPTIONAL
    *"     VALUE(HOLDDATE) LIKE  APQI-STARTDATE OPTIONAL
    *"     VALUE(NODATA) LIKE  APQI-PUTACTIVE DEFAULT '/'
    *"     VALUE(EXTNID) LIKE  MAKT-MAKTG
    *"     VALUE(VENDORNO) LIKE  LFA1-LIFNR
    *"     VALUE(PONUMBER) LIKE  EKKO-EBELN
    *"     VALUE(ITEMNUMBER) LIKE  LIPS-VGPOS
    *"     VALUE(MATERIAL) LIKE  MAKT-MAKTG
    *"     VALUE(DLYQTY) LIKE  LIPS-LFIMG
    *"     VALUE(BTCHNO) LIKE  LIPS-CHARG
    *"     VALUE(POSLR) LIKE  EKES-EBELP OPTIONAL
    *"  EXPORTING
    *"     VALUE(SUBRC) LIKE  SYST-SUBRC
    *"     VALUE(INDELYNO) LIKE  SY-MSGV2
    *"     VALUE(MSG1) LIKE  SY-MSGV1
    *"     VALUE(MSG2) LIKE  SY-MSGV2
    *"     VALUE(MSG3) LIKE  SY-MSGV3
    *"     VALUE(MSG4) LIKE  SY-MSGV4
    *"  TABLES
    *"      MESSTAB STRUCTURE  BDCMSGCOLL
    *"      ERRTAB STRUCTURE  YSYNERRMSGS
    *"      INDLYTAB STRUCTURE  YSYN_QTYTAB
    Updated by ANAND SYNISE 19.1.2007
      DATA: BEGIN OF bdctab OCCURS 0.
              INCLUDE STRUCTURE bdcdata.
      DATA: END OF bdctab.
      DATA: datenow(10) TYPE c,
            fldvar(30)  TYPE c,
            fldno       TYPE i,
            flditoc(6)  TYPE c,
            qty(13)     TYPE c.
      DATA maxposnr LIKE lips-posnr.
      DATA testposnr TYPE posnr.
      DATA itemnoint TYPE i.
      CONCATENATE sy-datum6(2) '.' sy-datum4(2) '.' sy-datum+0(4) INTO datenow.
      CLEAR bdctab.
      REFRESH bdctab.
      PERFORM open_group      USING group user keep holddate ctu.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '4007'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'RV50A-VERUR_LA'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '/00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-LIFNR'.
           bdctab-fval = vendorno.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LV50C-BSTNR'.
           bdctab-fval = ponumber.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-VERUR_LA'.
           bdctab-fval = extnid.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=MKAL_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIKP-BLDAT'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=POPO_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-POSNR(01)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '0111'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'RV50A-PO_MATNR'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = 'WEIT'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-PO_MATNR'.
           bdctab-fval = material.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=POLO_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-POSNR(01)'.
           APPEND bdctab.
    *ADDED BY ANAND ON 22-01-2007
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval =  ITEMNUMBER .     "ITEMNUMBER = LIPS-VGPOS
           APPEND bdctab.
    ************ENDED***********************
    ADDED BY MILIND 19.01.2007
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval =  poslr .
           APPEND bdctab.
    *    ENDED * *
       CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LIPS_SELKZ(01)'.
           bdctab-fval = ''.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '/00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-CHARG(01)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
          QTY = INDLYTAB-DLYQTY.
            qty = dlyqty.
           bdctab-fnam = 'LIPSD-G_LFIMG(01)'.
           bdctab-fval = QTY.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIPS-CHARG(01)'.
    *     BDCTAB-FVAL = INDLYTAB-BTCHNO.
           bdctab-fval = btchno.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=SICH_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-MATNR(02)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
      CALL TRANSACTION 'VL31N' USING bdctab MODE 'N'  MESSAGES INTO messtab.
      subrc = sy-subrc.
      PERFORM close_group USING     ctu.
      CLEAR bdctab.
      REFRESH bdctab.
      IF sy-subrc EQ 0.
        indelyno = sy-msgv2.
      ENDIF.
      LOOP AT messtab.
        MOVE: messtab-msgid TO errtab-msgid,
              messtab-msgnr TO errtab-msgnr,
              messtab-msgv1 TO errtab-msg1,
              messtab-msgv2 TO errtab-msg2,
              messtab-msgv3 TO errtab-msg3,
              messtab-msgv4 TO errtab-msg4.
        APPEND ERRtab.
      ENDLOOP.
      LOOP AT errtab.
        SELECT SINGLE text FROM t100
          INTO errtab-errmsg
          WHERE msgnr EQ errtab-msgnr AND arbgb EQ errtab-msgid
          AND sprsl EQ sy-langu.
        MODIFY errtab.
      ENDLOOP.
    ENDFUNCTION.

    Hi,
    Check this code:
    REPORT Z_CUSTOMER_UPLOAD .
                  D A T A         D E C L A R A T I O N S                *
    DATA:BEGIN OF IT_CUSTOMER OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_CUSTOMER.
    DATA:BEGIN OF IT_success OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_success.
    DATA:BEGIN OF IT_error OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_error.
    DATA: L_INDEX TYPE SY-TABIX.
    DATA:IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    IT_DATA TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    ERROR MESSAGE TABLE
    DATA:IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : C_S TYPE C VALUE 'S',
            C_E TYPE C VALUE 'E'.
    *DATA: IT_SUCCESS LIKE IT_CUSTOMER OCCURS 0,
         IT_ERROR LIKE IT_CUSTOMER  OCCURS 0.
    DATA : V_RECTOT TYPE I,
            V_RECERR TYPE I,
            V_RECSUC TYPE I.
                  S E L E C T I O N  -  S C R E E N                      *
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER        : P_FILE LIKE RLGRAP-FILENAME .
    SELECTION-SCREEN : END OF BLOCK B1.
               A T  S E L E C T I O N  -  S C R E E N                    *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    to get F4 help for p_file
      PERFORM F4_FILENAME USING P_FILE.
                S T A R T   O F   S E L E C T I O N                      *
    START-OF-SELECTION.
    Uploading data from flat file into it_tab
      PERFORM BDC_UPLOAD USING P_FILE.
      PERFORM PROCESS_DATA.
      PERFORM POPULATE_BDC.
                E N D  O F   S E L E C T I O N                           *
    *END-OF-SELECTION.
    PERFORM DISPLAY_REPORT.
    *&      Form  F4_FILENAME
          text
         -->P_P_FILE  text
    FORM F4_FILENAME USING    P_P_FILE.
    DATA:L_FILE TYPE IBIPPARMS-PATH.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = L_FILE .
       P_P_FILE = L_FILE.
    ENDFORM.                    " F4_FILENAME
    *&      Form  BDC_UPLOAD
          text
         -->P_P_FILE  text
    FORM BDC_UPLOAD USING    P_P_FILE.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = P_P_FILE
        I_BEGIN_COL                   = 1
        I_BEGIN_ROW                   = 1
        I_END_COL                     = 8
        I_END_ROW                     = 1000
      TABLES
        INTERN                        = IT_DATA
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " BDC_UPLOAD
    *&      Form  PROCESS_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM PROCESS_DATA.
    SORT IT_DATA BY ROW COL.
      LOOP AT IT_DATA.
    CASE IT_DATA-COL.
    WHEN 1.
    IT_CUSTOMER-KUNNR   = IT_DATA-VALUE.
    WHEN 2.
    IT_CUSTOMER-VKORG   = IT_DATA-VALUE.
    WHEN 3.
    IT_CUSTOMER-VTWEG   = IT_DATA-VALUE.
    WHEN 4.
    IT_CUSTOMER-MATNR   = IT_DATA-VALUE.
    WHEN 5.
    IT_CUSTOMER-KDMAT   = IT_DATA-VALUE.
    WHEN 6.
    IT_CUSTOMER-MEGRU   = IT_DATA-VALUE.
    WHEN 7.
    IT_CUSTOMER-LPRIO   = IT_DATA-VALUE.
    WHEN 8.
    IT_CUSTOMER-ANTLF   = IT_DATA-VALUE.
    APPEND IT_CUSTOMER.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    " PROCESS_DATA
    *&      Form  POPULATE_BDC
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_BDC.
    DATA:L_COUNTER TYPE N,
             L_STRING TYPE STRING.
    LOOP AT IT_CUSTOMER.
    AT NEW KUNNR.
    CLEAR L_COUNTER.
          L_INDEX = SY-TABIX.
          READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_dynpro      using 'SAPMV10A' '0100'.
    perform bdc_field       using 'MV10A-KUNNR'
                                  IT_CUSTOMER-KUNNR.
    perform bdc_field       using 'MV10A-VKORG'
                                  IT_CUSTOMER-VKORG.
    perform bdc_field       using 'MV10A-VTWEG'
                                  IT_CUSTOMER-VTWEG.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    L_COUNTER = L_COUNTER + 1.
        CLEAR L_STRING.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-MATNR(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                            IT_CUSTOMER-MATNR.
    CONCATENATE 'MV10A-KDMAT(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using     L_STRING
                                     IT_CUSTOMER-KDMAT.
    CONCATENATE 'MV10A-MEGRU(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using   L_STRING
                                    IT_CUSTOMER-MEGRU.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *-- For Page down in Call Transaction Mode
        IF L_COUNTER = 14.
          CLEAR L_COUNTER.
          PERFORM BDC_DYNPRO      USING 'SAPMV45A' '4001'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                                '=P+'.
        ENDIF.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-SELKZ(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                              IT_CUSTOMER-SELKZ.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SELE'.
    perform bdc_dynpro      using 'SAPMV10A' '0300'.
    perform bdc_field       using 'MV10A-KDMAT'
                                  IT_CUSTOMER-KDMAT.
    perform bdc_field       using 'MV10A-LPRIO'
                                  IT_CUSTOMER-LPRIO.
    perform bdc_field       using 'MV10A-ANTLF'
                                  IT_CUSTOMER-ANTLF.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/EBACK'.
    at end of kunnr.
    READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    CALL TRANSACTION 'VD51' USING IT_BDC MODE 'A' UPDATE 'S'
          MESSAGES INTO IT_MESSAGES.
          CLEAR IT_BDC.
          REFRESH IT_BDC.
    ENDAT.
      IF NOT IT_MESSAGES[] IS INITIAL.
        PERFORM FORMAT_MESSAGE.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    " POPULATE_BDC
    *&      Form  bdc_dynpro
          text
         -->P_0273   text
         -->P_0274   text
    FORM bdc_dynpro USING    VALUE(P_0273)
                             VALUE(P_0274).
    IT_BDC-PROGRAM = P_0273.
    IT_BDC-DYNPRO = P_0274.
    IT_BDC-DYNBEGIN = 'X'.
      APPEND IT_BDC.
      CLEAR IT_BDC.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
          text
         -->P_0278   text
         -->P_RECORD_KUNNR_001  text
    FORM bdc_field USING    VALUE(P_0278)
                           VALUE(P_0279).
    IT_BDC-FNAM = P_0278.
      IT_BDC-FVAL = P_0279.
      APPEND IT_BDC.
      CLEAR IT_BDC.
    ENDFORM.                    " bdc_field
    *&      Form  FORMAT_MESSAGE
          text
    -->  p1        text
    <--  p2        text
    FORM FORMAT_MESSAGE.
    DATA: L_MSG(100).
      LOOP AT IT_MESSAGES.
      READ TABLE IT_CUSTOMER INDEX L_INDEX.
        CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
                  ID        = IT_MESSAGES-MSGID
                  LANG      = SY-LANGU
                  NO        = IT_MESSAGES-MSGNR
                  V1        = IT_MESSAGES-MSGV1
                  V2        = IT_MESSAGES-MSGV2
                  V3        = IT_MESSAGES-MSGV3
                  V4        = IT_MESSAGES-MSGV4
             IMPORTING
                  MSG       = L_MSG
             EXCEPTIONS
                  NOT_FOUND = 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.
        write:/ l_msg.
      ENDLOOP.
    ENDFORM.                    " FORMAT_MESSAGE
    reward if helpful,
    keerthi

  • Creation of PGI using BDC for tc VL02N is not happening..

    Hi All,
    i need to do Post Goods Issue (PGI) thro' BDC and after that i need to update the flag in Ztable.
    its giving Success message and updating the database also.
    but its not issuing the PGI.and further i want to create billing doc.So its compulsory to me to post PGI.
    if i look into the BDCMSGCOLL structure its giving "NO BATCH INPUT DATA FOR SCREEN"? why this is happening?
    please let me know immediately....
    REFRESH: tt_bdcmsgcoll .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = wa_created-document_numb
        IMPORTING
          output = wa_created-document_numb.
      REFRESH tt_bdcdata.
      PERFORM bdc_dynpro      USING text-001 text-002.
      PERFORM bdc_field       USING text-008
                                   text-014.
      PERFORM bdc_field       USING text-009
                                    text-011.
      PERFORM bdc_field       USING text-014
                                    wa_created-document_numb.
      PERFORM bdc_dynpro      USING text-001 text-003.
      PERFORM bdc_field       USING text-009
                                    text-036.
      PERFORM bdc_field       USING text-025
                                    sy-datum.
      PERFORM bdc_field       USING text-008
                                    text-035.
      PERFORM bdc_field       USING text-037
                                    sy-datum.
      PERFORM bdc_field       USING text-038
                                    text-029.
      PERFORM bdc_field       USING text-016
                                    c_x.
      CALL TRANSACTION c_t_del USING tt_bdcdata
                                    MODE c_m
                                    UPDATE c_u
                                    MESSAGES INTO tt_bdcmsgcoll .
      SORT tt_bdcmsgcoll BY msgtyp.
      READ TABLE tt_bdcmsgcoll INTO wa_bdcmsgcoll WITH KEY msgtyp = c_e.
      IF sy-subrc EQ 0.
        LOOP AT tt_bdcmsgcoll INTO wa_bdcmsgcoll WHERE msgtyp = c_e.
          CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
              id        = wa_bdcmsgcoll-msgid
              lang      = text-010
              no        = wa_bdcmsgcoll-msgnr
              v1        = wa_bdcmsgcoll-msgv1
              v2        = wa_bdcmsgcoll-msgv2
              v3        = wa_bdcmsgcoll-msgv3
              v4        = wa_bdcmsgcoll-msgv4
            IMPORTING
              msg       = v_msg
            EXCEPTIONS
              not_found = 1
              OTHERS    = 2.
          IF sy-subrc <> 0.
          ENDIF.
          WRITE :/ v_msg.
        ENDLOOP.
      ELSE.
        MOVE : c_x TO wa_worklist-pgi_flag.
        READ TABLE tt_epit INTO wa_epit WITH KEY epi_id = wa_worklist-epi_id epi_sr = wa_worklist-epi_sr.
        IF sy-subrc EQ  0.
          MODIFY tt_epit FROM wa_worklist TRANSPORTING pgi_flag WHERE epi_id = wa_worklist-epi_id AND epi_sr = wa_worklist-epi_sr.
        ELSE.
          APPEND wa_worklist TO tt_epit.
        ENDIF.
         wa_epit-pgi_flag = c_x.
         MODIFY   tt_epit FROM wa_epit TRANSPORTING pgi_flag WHERE epi_id = wa_worklist-epi_id AND del_no = wa_created-document_numb .
         UPDATE zsd_dt_epit SET pgi_flag = 'X' WHERE epi_id = wa_worklist-epi_id AND del_no = wa_created-document_numb .
         IF  sy-subrc EQ 0.
         ENDIF.
      ENDIF.

    HI,
    Please refer this
    To perform Post goods issue
        PERFORM OPEN_GROUP.
        PERFORM BDC_DYNPRO      USING 'SAPMV50A' '4004'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LIKP-VBELN'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=WABU_T'.
        PERFORM BDC_FIELD       USING 'LIKP-VBELN' DELIVERY.
                                 '84000064'.
        PERFORM BDC_TRANSACTION USING 'VL02N'.
        PERFORM CLOSE_GROUP.
        CLEAR : DELIVERY,
                T_BSITEM,
                T_BSICTL.
      ENDIF.
    ENDFORM.                    " DELIVERY

  • Problem in creation of BDC for transaction phap_create

    Hello Friends,
    I am trying to create BDC for PHAP_CREATE.
    When you run a transaction a pop up window appears to select the template id.
    And in BDC it is selected by cursor position. So once selected, the value of template id cannot be changed.
    I want this as a parameter.So that each time I run a BDC I will be able to create different types of Appraisal documents i.e with different template ids.
    How to go about it???
    Regards,
    Bhushan

    Hi,
    For selecting the id, while doing recording,
    record with
    CTRL + F ( Where u can give ur id) and proceed further.

Maybe you are looking for