CS02 BDC

Hello All,
I created a BDC program for the CS02 Transaction.
But the problem is :
1. I went to the Transaction CS02 directly.
2.Entered the parameter values for :
Material,
Plant,
BOM Usage,
Alternative BOM,
Change Number
Date
3. Pressed Enter
4. the screen called is 2150 and subscreen is 802.
( all the records are in the Table control )
5. For the same scenario,
When I execute my BDC program in foreground the screen called is : 150 .
For this screen all the records are with the CHECK-BOX .
6. The problem what I'm facing is : For my BDC Program output when I sellect the one record with the CHECK-BOX Selection and scroll down and check one more record and then scroll up then the first record which I checked is un-checked.
SO my Qns are :
A. WHy in BDC the same screens are not called as in standard transaction CS02.
B. How to maintain the checked records in the BDC even when scrolled down ?
Request you to clarify !
Regards,
Deepu.K

Hello Tamás,
You mean to say that I should check the record based upon the Position value by reading it using Get cursor command ?
Request you to clarify !
Regards,
Deepu.K

Similar Messages

  • A problem about CS02 BDC

    Hi,
    I wrote a bdc about modification BOM's quantity of line item with ECM number. following is code:
    report ZCS02_BDC
           no standard page heading line-size 255.
    BDC table
    DATA: t_bdc       LIKE bdcdata  OCCURS 0 WITH HEADER LINE,
               t_bdcmsg LIKE bdcmsgcoll  OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_log OCCURS 0,
                   information(289) TYPE c,   "返回信息
               END OF t_log.
    DATA: v_mode TYPE c VALUE 'N'.
    perform fm_set_bdc  tables t_bdc using 'X' 'SAPLCSDI'  '0100'.
    perform fm_set_bdc:
      tables t_bdc using ' ' 'BDC_CURSOR' 'RC29N-AENNR',
      tables t_bdc using ' ' 'BDC_OKCODE' '/00',
      tables t_bdc using ' ' 'RC29N-MATNR' '1224',
      tables t_bdc using ' ' 'RC29N-STLAN' '2',
    tables t_bdc using ' ' 'RC29N-AENNR' '500000000084',
    tables t_bdc using ' ' 'RC29N-DATUV' '09.10.2008',
    tables t_bdc using 'X' 'SAPLCSDI' '0150',
    tables t_bdc using ' ' 'BDC_CURSOR' 'RC29P-MENGE(02)',
    tables t_bdc using ' ' 'BDC_OKCODE' '=FCBU',
    tables t_bdc using ' ' 'RC29P-MENGE(01)' '2',
    tables t_bdc using ' ' 'RC29P-MENGE(02)' '3',
    tables t_bdc using 'X' 'SAPLCSDI' '0130',
    tables t_bdc using ' ' 'BDC_OKCODE' '/EENDE'.
    CALL TRANSACTION 'CS02'
             USING    t_bdc
             MODE     'N' "Background performance
             UPDATE   'S' "local updata
             MESSAGES INTO t_bdcmsg. "all message table
    READ TABLE t_bdcmsg WITH KEY msgtyp = 'S'
                                                        msgid = 'V1'
                                                        msgnr = '311'.
    "批导入成功的标志,可以自己debug表t_bdcmsg中去找.
    IF sy-subrc EQ 0.
      CONCATENATE  '' '修改成功' INTO t_log.
      APPEND t_log.
      CLEAR t_log.
    ELSE.
      LOOP AT t_bdcmsg.
        IF t_bdcmsg-msgtyp = 'E'
            OR t_bdcmsg-msgv1 <> ''
            OR t_bdcmsg-msgv2 <> ''
            OR t_bdcmsg-msgv3 <> ''
            OR t_bdcmsg-msgv4 <> ''.
          MESSAGE ID  t_bdcmsg-msgid
                  TYPE  t_bdcmsg-msgtyp
                  NUMBER  t_bdcmsg-msgnr
                  WITH t_bdcmsg-msgv1
               t_bdcmsg-msgv2
               t_bdcmsg-msgv3
               t_bdcmsg-msgv4
               INTO t_log-information.
          CONCATENATE  '出错:' t_log-information INTO t_log-information.
          APPEND t_log.
          CLEAR t_log.
        ENDIF.
      ENDLOOP.
    ENDIF.
    LOOP AT t_log.                          "显示出错信息
      WRITE:/ t_log-information.
    ENDLOOP.
    *perform close_group.
    FORM  fm_set_bdc TABLES t_bdc STRUCTURE bdcdata
            USING u_sign TYPE c
                  u_par1
                  u_par2.
      CLEAR: t_bdc.
      IF u_sign = 'X'.
        t_bdc-program = u_par1.
        t_bdc-dynpro = u_par2.
        t_bdc-dynbegin = u_sign.
      ELSE.
        t_bdc-fnam = u_par1.
        t_bdc-fval = u_par2.
      ENDIF.
      APPEND t_bdc.
    ENDFORM.                    "fm_set_bdc
    excuted the code,display 'error:Date 24.10.2008 copied from change number'
    why didn't  this warning skip in BDC?
    How to solve this problem?
    Best Regards.
    Pangyanting

    Hi
    I dont see any internal table in the code looping...you are executing the same values which are taken from recording..
    For Example:
    perform fm_set_bdc_field tables t_bdc using 'RC29N-MATNR'
    '0000013107'. " this is the value given during recording
    perform fm_set_bdc_field tables t_bdc using 'RC29N-MATNR'
    itab-matnr. "it should be replaced like this,so the material number you want to upload will be entered in the field.
    You are getting sy-subrc = 0,because it is creating with the same values again.
    Further here is the sample code for BDC:
    REPORT  ZZPSALES_BDC1.
    types: begin of itab,
           b1(4) type c,
           b2(4) type c,
           b3(2) type c,
           b4(2) type c,
           b5(10) type c,
           b6(10),
           b7(10) type C,
           b8(10) type c,
           b9(8) type c,
           b10(8) type c,
           end of itab,
           begin of itab1,
           b8(10) type c,
           i1(15) type c,
           i2(4) type c,
           i3(4) type c,
           i4(15) type c,
           end of itab1.
    data: wa_itab type itab occurs 1 with header line.
    data: wa_itab1 type itab1 occurs 1 with header line.
    DATA: I_BDCDATA TYPE BDCDATA OCCURS 1 WITH HEADER LINE.
    data: it_itab type alsmex_tabline occurs 1 with header line,
          it_itab1 type alsmex_tabline occurs 1 with header line .
    parameters: file1 type rlgrap-filename default 'C:\Documents and Settings\pri\Desktop\open SO1.xls' lower case.
    DATA: CNT TYPE N,
          cnt1 type n.
    DATA:FNAM(20) TYPE C.
    DATA: SAPDATE(10) TYPE C.
    at selection-screen.
    at selection-screen on value-request for file1.
      CALL FUNCTION 'F4_FILENAME'
    *    EXPORTING
    *      PROGRAM_NAME        = SYST-CPROG
    **      DYNPRO_NUMBER       = SYST-DYNNR
    **      FIELD_NAME          = ' '
       IMPORTING
         FILE_NAME           = file1.
    start-of-selection.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       EXPORTING
         FILENAME                      = file1
         I_BEGIN_COL                   = 2
         I_BEGIN_ROW                   = 9
         I_END_COL                     = 11
         I_END_ROW                     = 10
       TABLES
         INTERN                        = it_itab
    *  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.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = file1
        I_BEGIN_COL                   = 1
        I_BEGIN_ROW                   = 22
        I_END_COL                     = 5
        I_END_ROW                     = 25
      TABLES
        INTERN                        = it_itab1
    * 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.
    loop at it_itab.
    case it_itab-col.
    when '1'.
      wa_itab-b1 = it_itab-value.
    when '2'.
      wa_itab-b2 = it_itab-value.
    when '3'.
      wa_itab-b3 = it_itab-value.
    when '4'.
      wa_itab-b4 = it_itab-value.
    when '5'.
      wa_itab-b5 = it_itab-value.
    when '6'.
      wa_itab-b6 = it_itab-value.
    when '7'.
      wa_itab-b7 = it_itab-value.
    when '8'.
      wa_itab-b8 = it_itab-value.
    when '9'.
      wa_itab-b9 = it_itab-value.
    when '10'.
      wa_itab-b10 = it_itab-value.
    append wa_itab.
    endcase.
    endloop.
    loop at it_itab1.
    case it_itab1-col.
      when '1'.
        wa_itab1-b8 = it_itab1-value.
      when '2'.
        wa_itab1-i1 = it_itab1-value.
      when '3'.
        wa_itab1-i2 = it_itab1-value.
      when '4'.
        wa_itab1-i3 = it_itab1-value.
      when '5'.
        wa_itab1-i4 = it_itab1-value.
      append wa_itab1.
      endcase.
      endloop.
    CLEAR SY-TABIX.
    loop at wa_itab.
    refresh i_bdcdata.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-AUART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  WA_ITAB-B1.
    perform bdc_field       using 'VBAK-VKORG'
                                  WA_ITAB-B2.
    perform bdc_field       using 'VBAK-VTWEG'
                                  WA_ITAB-B3.
    perform bdc_field       using 'VBAK-SPART'
                                  WA_ITAB-B4.
    CNT = 1.
    CLEAR WA_ITAB1.
    LOOP AT WA_ITAB1 WHERE B8 = WA_ITAB-B8.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8. "observe here, we are giving customized fields.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/25/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    concatenate 'RV45A-KWMENG(0' CNT ')' INTO FNAM.
    perform bdc_field       using 'BDC_CURSOR'
                                  FNAM.
    CONCATENATE 'RV45A-MABNR(0' CNT ')' INTO FNAM.
    perform bdc_field       using FNAM
                                  WA_ITAB1-I1.
    CONCATENATE 'RV45A-KWMENG(0' CNT ')' INTO FNAM.
    perform bdc_field       using FNAM
                                  WA_ITAB1-I2.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ITEM'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/25/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    concatenate 'RV45A-KWMENG(0' cnt ')' into fnam.
    perform bdc_field       using 'BDC_CURSOR'
                                  FNAM.
    READ TABLE WA_ITAB1." INDEX '0' .
    IF SY-TABIX = 1.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\06'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-KWMENG'.
    *perform bdc_field       using 'RV45A-KWMENG'
    *                              WA_ITAB1-I2.
    *perform bdc_field       using 'VBAP-VRKME'
    *                              'EA'.
    perform bdc_field       using 'RV45A-ETDAT'
                                  wa_itab-b7.
    *perform bdc_field       using 'RV45A-PRGBZ'
    *                              'D'.
    ENDIF.
    perform bdc_dynpro      using 'SAPMV45A' '5003'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KOMV-KBETR(07)'.
    perform bdc_field       using 'KOMV-KSCHL(07)'
                                  WA_ITAB1-I3.
    perform bdc_field       using 'KOMV-KBETR(07)'
                                  WA_ITAB1-I4.
    perform bdc_dynpro      using 'SAPMV45A' '5003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=HEAD'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KOMV-KSCHL(08)'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=S\BACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-PRSDT'.
    perform bdc_field       using 'VBAK-AUDAT'
                                  '06/18/2008'.
    perform bdc_field       using 'VBAK-VKBUR'
                                  '0002'.
    perform bdc_field       using 'VBAK-WAERK'
                                  'USD'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '06/18/2008'.
    perform bdc_field       using 'VBKD-KDGRP'
                                  'A1'.
    *perform bdc_dynpro      using 'SAPMV45A' '5003'.
    *perform bdc_field       using 'BDC_OKCODE'
    *                              '=S\BACK'.
    *perform bdc_field       using 'BDC_CURSOR'
    *                              'KOMV-KSCHL(08)'.
    cnt = cnt + 1.
    ENDLOOP.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KKNT'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(02)'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-TXT_VBELN'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'COBL-PS_POSID'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_field       using 'COBL-PS_POSID'
                                  WA_ITAB-B9.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KFPL'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(02)'.
    perform bdc_dynpro      using 'SAPLCNMS' '1300'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MLSTS-AUFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=GO'.
    perform bdc_field       using 'MLSTS-SELPS'
                                  'X'.
    perform bdc_field       using 'MLSTS-PSPNR'
                                  WA_ITAB-B10.
    perform bdc_dynpro      using 'SAPLCNMS' '1310'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=MRKS'.
    perform bdc_dynpro      using 'SAPLCNMS' '1310'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=GET'.
    perform bdc_dynpro      using 'SAPLV60F' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=S\BACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'FPLA-BEDAT'.
    perform bdc_field       using 'FPLA-BEDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'FPLA-BEDAR'
                                  '07'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(02)'.
    perform bdc_dynpro      using 'SAPLSPO2' '0101'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=OPT1'.
    CALL TRANSACTION 'VA01' USING i_bdcdata MODE 'A'.
    endloop.
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR i_bdcdata.
      i_bdcdata-program  = PROGRAM.
      i_bdcdata-dynpro   = DYNPRO.
      i_bdcdata-dynbegin = 'X'.
      APPEND i_bdcdata.
    ENDFORM.
    *        Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR i_bdcdata.
        i_bdcdata-fnam = FNAM.
        i_bdcdata-fval = FVAL.
        APPEND i_bdcdata.
      ENDIF.
    ENDFORM.
    Regards,
    Vishwa.

  • How to write bdc programme to load the data in table control

    Hi
    i have to write a bdc programme and the data to be filled in table control fileds can any one help me with the code how i have to write it is for cs02 tcode
    thanks and regards
    naveen

    Hi Naveen,
    See the sample code
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29N-DATUV'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=KALL'.
      PERFORM bdc_field       USING 'RC29N-MATNR'
                                    w_matnr.
      PERFORM bdc_field       USING 'RC29N-WERKS'
                                   w_werks.
      PERFORM bdc_field       USING 'RC29N-STLAN'
                                    '1'.
      PERFORM bdc_field       USING 'RC29N-DATUV'
                                    '01/01/2004'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '2110'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=FCPU'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29K-BMENG'.
      PERFORM bdc_field       USING 'RC29K-BMENG'
                                    w_testuph.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0150'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-MENGE(02)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=FCBU'.
      PERFORM bdc_field       USING 'RC29P-MENGE(01)'
                                    w_testuph.
    "For raw material.
      IF NOT w_raw_mat_fg IS INITIAL.
        PERFORM bdc_field       USING 'RC29P-MENGE(02)'
                                   w_testuph.
      ENDIF.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0130'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POSNR'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0131'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POTX1'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0130'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POSNR'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0131'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POTX1'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0150'.
      CALL TRANSACTION 'CS02' USING bdcdata MODE w_display_mode UPDATE 'S'
                 MESSAGES INTO t_message_tab.
    Prabhudas

  • BDC selecting component - Assigning object dependencies

    Hi,
    I am facing a problem in developing a BDC program. In transaction CS02, for a configurable material there may be n number of components. The number of components may vary from material to material. My requirement is to assign object dependency Q & S to all the components for a given material.
    Through BDC program how can i pick the components one by one and assign object dependencies Q and S at runtime??? Dynamically on what basis do i have to pick the component? Any supporting code will be more helpfull. Very thankfull to you for solving the issue.
    Thanks,
    RAM

    I have a program which does exactly this.   What it does it excepts a flat comma-delimited file and uses this to chose the component and assign the obj dep.  Now that I'm looking at it, it looks that it will allow up to three obj dep to be added for a single component.  The file layout will need to have......
    material number
    plant
    item number
    component material lnumber
    object dep 1
    object dep 2
    object dep 3
    I can send you the code if you email me at the address on my business card.
    Regards
    Rich Heilman

  • URGENT, bdc uploaded wrong data

    Dear all SAP-ABAP consulatants,
                                                     i would request you people to kindly help me out from my scenario.
    i need to delete records from transaction 'cs02' , where in  by validating the field so that  it wont delete  the existing records.
    the fields are matnr,werks,stlan,idnrk,meng,meins,postp
    From all d fields above i need to delete the record for field stlan,idnkr meng,meins &postp.
    MY BDC ISNT WORKING IN A PROPER MANNER ITS DELETING ALL D RECORDS FOR DIFFERENT MATERIAL NUMBERS.
    ths code is
    report Z_PP_BOM_DEL_SCRAP
           no standard page heading line-size 255.
    include bdcrecx1.
    start-of-selection.
    data:begin of it_data occurs 0,
         matnr(18),    "Material
        idnrk(18),    "Component
         end of it_data.
    Parameters:p_file type IBIPPARMS-PATH.
    data:p1_file type string.
    at selection-screen on value-request for p_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = p_file
    start-of-selection.
    p1_file = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = p1_file
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = '#'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = it_data.
    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.
    perform open_group.
    loop at it_data.
    Refresh bdcdata.
    perform pro_data.
    endloop.
    perform close_group.
    form pro_data.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR'
                                  it_data-matnr.      "'S_HIFUH2A1A1A1A-02'.
    perform bdc_field       using 'RC29N-WERKS'
                                  'sm01'.
    perform bdc_field       using 'RC29N-STLAN'
                                  '1'.
    perform bdc_field       using 'RC29N-DATUV'
                                  '28.11.2007'.
    perform bdc_dynpro      using 'SAPLCSDI' '0150'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SETP'.
    perform bdc_dynpro      using 'SAPLCSDI' '0708'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CLWI'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-SELID'.
    perform bdc_field       using 'RC29P-SELID'
                                  'scrap100002'.
    perform bdc_dynpro      using 'SAPLCSDI' '0150'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-AUSKZ(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCDL'.
    perform bdc_field       using 'RC29P-AUSKZ(01)'
                                  'X'.
    *if sy-subrc  <> 0.
    perform bdc_dynpro      using 'SAPLCSDI' '0150'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCBU'.
    *endif.
    perform bdc_transaction using 'CS02'.
    endform.

    Thanks for the reply sandeep, actually wt happen is by mistake I have uploaded wrong line item  for the material in my first BDC so I have to delete those records that is the line items which were entered wrong.
    the fieds of the line items are IDNRK,meng, meins & postp.
    I am able to delete the records using the program I have posted but the problem is if that particular line item(which I need to delete) is not available in that material the BDC stuck saying the line item not found or else its deleting some other line item which is not  right .
    so I need some help in writing the logic to this BDC so that it only deletes the required line items and if not found it has to go to the next material.
    Thanks for your time and appreciate your help

  • Give some pp module tcodes used in bdc and their purposes

    give some pp module tcodes used in bdc and their purposes
    thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi
    Important PP tables are..
    Master Data:
    CRHD Work center header
    MAPL Allocation of task lists to materials
    PLAS Task list - selection of operations/activities
    PLFH Task list - production resources/tools
    PLFL Task list - sequences
    PLKO Task list - header
    PLKZ Task list: main header
    PLPH Phases / suboperations
    PLPO Task list operation / activity
    PLPR Log collector for tasklists
    PLMZ Allocation of BOM - items to operations
    Production Orders:
    STKO BOM - header
    STPO BOM - item
    STAS BOMs - Item Selection
    STPN BOMs - follow-up control
    STPU BOM - sub-item
    STZU Permanent BOM data
    PLMZ Allocation of BOM - items to operations
    MAST Material to BOM link
    KDST Sales order to BOM link
    AUFK Production order headers
    AFIH Maintenance order header
    AUFM Goods movement for prod. order
    AFKO Order header data PP orders
    AFPO Order item
    RESB Order componenten
    AFRU Order completion confirmations
    Planned orders and Independent requirements:
    PLAF Planned orders
    RESB Material reservations
    PBIM Independent requirements for material
    PBED Independent requirement data
    PBHI Independent requirement history
    PBIV Independent requirement index
    RKPF header
    Capacity Planning:
    KBKO Header record for capacity requirements
    KBED Capacity requirements records
    KBEZ Add. data for table KBED (for indiv. capacities/splits)
    Important Transcation:
    CA – usually reserved for routing type transactions. This includes reference rate routings and rate routings.
    CA31, CA32, CA33: Reference Rate Routing Creationg
    CA21, CA22, CA23: Rate Routing Creationg
    CA63, CA64 – Change documents for Routings
    CA80, CA85, CA90, CA95, CA98: Where Used, Replacing Routings, etc.
    CR – Usually reserved for work center type transactions.
    CR01, CR02, CR03: Work Center Creation
    CR05, CR07, etc. – Work Centers analysis, etc.
    CS – Usually reserved for BOM type transactions.
    CS01, CS02, CS03 – Bill of Materials
    CS07, CS08, CS09: Extend Bill of materials
    CS11, CS12, CS13: Explode Bill of materials
    F – Usually reserved for financial type transactions
    A – Usually reserved for financial type transactions.
    LM – Label Management type transactions
    MB – Usually reserved for inventory type transactions
    MB51 – Material document history
    MB1A – Goods Issue for Scrap
    MB1B – Goods transfer
    MD – Usually reserved for MRP type transactions
    MD01, MD02, MD03, MDBT - MRP Run
    MD04, MD07: Stock/Requirements List
    MD05, MD06: MRP List (static)
    MD11, MD12, MD13, MD16: Planned Order creation, etc
    MD20, MD21: Planning file
    ME – Usually reserved for Purchasing Type Transactions
    ME01, ME03, ME05 – Source Lists
    ME11, ME12, ME13 – Info Records
    ME21N, ME22N, ME23N: Purchase Order creation
    ME31L, ME32L, ME33L: Scheduling Agreement Creation
    ME51, ME57 – Purchase Requisitions
    ME38, ME38: Schedule Line display
    ME37: Stock Transport Scheduling Agreements
    ME27: Stock Transport Orders
    MM – Usually reserved for material master type transactions:
    MM01, MM02, MM03: Material Master Creation
    MM04 – Change Documents
    MM06: Mark for Deletion
    MM60: Materials List
    V – Usually reserved for Sales and Distribution type transactions
    VA – Sales Orders
    VL – Deliveries
    VT – Shipments
    VD – Customer Master for Sales
    VK – Condition Records
    http://www.sap-img.com/sap-pp.htm
    http://www.erpgenie.com/sapfunc/pp.htm
    Reward if usefull

  • BOM update BDC

    Hi all,
    I want to populate a field for each component of the BOM using CS02. For example I have two components for a particular BOM.
    I am selecting each component and going into the details of each component.Here I want to populate the field.
    After populating this field, I am selecting the second component and repeating the process.
    I want to write a BDC program for this.Can anyone tell me how to use the concept of table controls in this case with an example.
    Here I don't have two separate files i.e., one for header and the other for items.
    thanks
    Sandeep

    Dear Sandeep,
    Please go through the link:
    http://www.sap-img.com/abap/program-loads-the-bill-of-material.htm
    Regards,
    Abir
    Don't forget to award Points *

  • 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.

  • Help needed in BDC

    Dear Experts,
    I have a module pool program and transaction for shipping advice, where I have given a option that if user enters Sales Order in the selection screen and in the next screen it shows all the related infromation of that order and if needed user can edit few fields in this screen and can take print.
    Now for the same report I dont want to show any screen to user after user enters the order and executes directly it should display the dialog box for 'Print' and 'Print Preview'.
    I did BDC recording for the transaction of shipping adive report and with that code I have developed other program and if run this program in foreground (Mode "A")it will show all screens with that dialog screen for 'Print' also but if I run in background (Mode "B") it will not show any screen and it will print the document directly.
    Now my requirement is I have to show only dialog screen for 'Print' & 'Print Preview'.
    Please give me your valuable Ideas on how to achieve this...
    Thanks in advance.
    Best Regards
    Venkat

    Hello,
    May be you are not using the full recording or might have some mistake(s) is going on in the completion of recording that is why it is creating problem. And also please check the call transaction code in the BDC program, whether you are performing the accurate t-code with that or not and also perform BDC functions also. If it is right than it would not might have any problem regarding the required output as you want.
    Thanks & Regards,
    Akg

  • What is the Tcodes for Uploading of data using BDC & CATT

    PP members:
    I was going through the <b>cutover activities</b> ,  and what I understood is  we transfer all the legacy system data into SAP before going live
    The data upload follows certain steps (depends on the organizational design load strategies)
    First we upload all the master data ( material master, BOM, W/C's & Routings)
    Then the transaction data ( Ideally speaking, there should no open orders i.e. WIP as on the day of cutoff )
    If the WIP (Work in Process) is unavoidable then the materials consumed shall be treated as <b>materials of the previous stage</b> and necessary adjustments shall be made after cutover day
    At this point, I could not able to understand what does the author mean <b>materials of the previous stage</b>
    Now comming to the uploading of data into SAP from legacy system, we use tools like LSMW, CATT & BDC
    Is it a must to use <b>only LSMW tool</b> to upload master data or any other upload tools are fine
    Lastly,. I am not sure about the Tcode of CATT & BDC
    Summary of the questions:
    1.What does the author mean  <b>material of previous stage</b>, for WIP materials during cutover activities
    2. Is it mandatory to use only LSMW tool for uploading for master data
    3. What are the Tcodes for upload tools CATT & BDC ?
    Thanks for your time
    Suren R

    Dear,
    1.What does the author mean material of previous stage, for WIP materials during cutover activities - as i understood, what is the stage of material..like it must have gone through 2 work centers and other 2 is left. i.e. you need to create Production order with only 2 operation as other 2 is already over. - usually it is done in such a way that we will create Production order and confirm till 2 operations and WIp is calculated so thatb FI will tally the books in SAP and lagacy.
    2. Is it mandatory to use only LSMW tool for uploading for master data - no you can use any tool as required and suits yr requirement
    3. What are the Tcodes for upload tools CATT & BDC- BDC through a prog in SE38. CATT through - SCEM.

  • Unable to capture sy-ucomm in BDC

         Hello Everyone, 
    I have created a BDC for CG3Y everything is working fine after creating a log when sy-subrc eq 0. when user hits SAVE I have given a message stating 'LOG HAS BEEN GENERATED' but when the pop for overwrite appears and I hit NO, it should give a different message for that i am not able to capture SY-UCOMM.
    please help.

    Actually the issue was just had to get the file(Error log) from Application Server to Presentation, Here is the code for it.
    data: i_fl_openerror type boolean,
    i_os_message(100) type C,
    i_flg_continue type boolean.
    CALL FUNCTION 'C13Z_FILE_DOWNLOAD_ASCII'
    EXPORTING
    i_file_front_end          = 'C:\ERROR_LOG.XLS'
    i_file_appl               = '/USR/SAP/TMP/FILE3.XLS'
    *   I_FILE_OVERWRITE          = ESP1_FALSE
    IMPORTING
    E_FLG_OPEN_ERROR          = i_fl_openerror
    E_OS_MESSAGE              = i_os_message
    EXCEPTIONS
    FE_FILE_OPEN_ERROR        = 1
    FE_FILE_EXISTS            = 2
    FE_FILE_WRITE_ERROR       = 3
    AP_NO_AUTHORITY           = 4
    AP_FILE_OPEN_ERROR        = 5
    AP_FILE_EMPTY             = 6
    OTHERS                    = 7
    IF sy-subrc <> 0.
    case sy-subrc.
    when 2.
    CALL FUNCTION 'C14A_POPUP_ASK_FILE_OVERWRITE'
    IMPORTING
    E_FLG_CONTINUE       = i_flg_continue
    if i_flg_continue eq true.
    CALL FUNCTION 'C13Z_FILE_DOWNLOAD_ASCII'
    EXPORTING
    i_file_front_end          = 'C:\ERROR_LOG.XLS'
    i_file_appl               = '/USR/SAP/TMP/FILE3.XLS'
    I_FILE_OVERWRITE          = ESP1_TRUE
    IMPORTING
    E_FLG_OPEN_ERROR          = i_fl_openerror
    E_OS_MESSAGE              = i_os_message
    EXCEPTIONS
    FE_FILE_OPEN_ERROR        = 1
    FE_FILE_EXISTS            = 2
    FE_FILE_WRITE_ERROR       = 3
    AP_NO_AUTHORITY           = 4
    AP_FILE_OPEN_ERROR        = 5
    AP_FILE_EMPTY             = 6
    OTHERS                    = 7
    IF sy-subrc <> 0.
    write : / 'CANNOT DOWNLOAD' , '/USR/SAP/TMP/FILE3.XLS' .
    else.
    write : / 'LOG HAS BEEN GENERATED C:\ERROR_LOG.XLS'.
    endif.
    else.
    write : / 'LOG NOT GENERATED'.
    endif.
    when others .
    write : / 'CANNOT DOWNLOAD FILE1', '/USR/SAP/TMP/FILE3.XLS'.
    endcase.

Maybe you are looking for

  • Barcodes not diaplyed in PDF output

    Hi , I am not able to display bar codes in PDF output but its working fine in all other output's. can any one guide me where exactly I need to save xdo.cfg file and what should be the exact content. I got code128.ttf and saved it in windows/font and

  • How to disable/enable the cells for editing column wise in JTable in java?

    Hi All, Can any one tell me how to disable the cells for editing by column wise in JTable? Here depending upon the radio button selected, I need 2 disable some columns for editing and enable some columns for editing? how can I do tat using JAVA? Any

  • T42- 'Always On' logs me out !

    One of two little problems with my newly-acquired T42 Thinkpad. I run with power management settngs set to 'Always On'.  I run with the laptop connected to mains power (subsidiary question - what effect does this have on battery lifetime ?). After 5

  • System Not Recognizing Javac

    Sytem: Windows XP Home Edition Java Version: 1.4.0 'javac' is not an internal or external command, operable program or batch file. How do I set my classpath? Please dummy down starting at the Advanced Tab in System Properties. =) That is, before I br

  • Everytime I quit Firefox it re-starts and opens again

    Every time I quit and close down Firefox it restarts and opens again after a few seconds. I then close down the second instance of Firefox and it stays closed. This has been happening forever and I can't seem to find a solution for it anywhere.