BDC Program 46c to ECC

Dear Experts,
I am generating a BDC program for a tcode in 4.6c version and i am transporting(download/upload)  it  to ECC and when I am executing this  in ECC it is excuting the older programs that are avaliable in the repository not the ECC default programs. can you pls help me out, how i can run the ECC's default programs and screen    for this BDC program.
Ex : 46c : Tcode :VL31N
               Program :SAPMV50B
               Screen  :107
       ECC : Tcode : VL31N
                 Program : SAPME50A
                 Screen : 4007.
But when I am executing BDC program, generated on 46c in ECC  It is executing
              "Program :SAPMV50B
               Screen  :107"              
ratherthan
               Program : SAPME50A
               Screen : 4007
Pls help me, or give me other solution for the same.
Thanks in advance.
Ameen.

Please open your program by SE38 to find the following statements:
perform bdc_dynpro      using 'SAPMV50B' '0107'.
Change it to:
perform bdc_dynpro      using 'SAPMV50A' '4007'.
Edited by: Bruce Hu on Jan 15, 2008 2:38 AM

Similar Messages

  • BDC program on COGI not working in ECC-need help

    Hi,
    We are doing a SAP upgrade from 4.6c to ECC. One of the custom tcodes which were using BDC programming on COGI is now broken.Since , COGI is now changed in Ecc 6.0 with respect to the output which is now inALV and the earlier Date funtionaliy button is no more there in ECC6.0.
    We are still not to able to find relevant BAPI/function module/alternative for that matter.Rerecording COGI for new environment is not working since it involves alv call functions, which cannot be recorded in BDC.
    Please provide any inputs/valuable suggestions for same.

    Hello AlbertMarsh,
    I've tried, and wasn't able to locate your My Best Buy Member ID with the information you provided to the forums.  I'm going to need you to send me a private message by clicking the blue box at the end of my signature with your My Best Buy member ID. 
    I’m going to add more clarity to enuf's Trade-In post. The 10% bonus is on the total amount prior to the additional 30% promotion. So if you got $10 Trade-In credit and had 30% bonus ($13), you would get $1 additionally from original base value for Gamers Club Unlocked not $1.30.  I hope that makes sense.  
    Blake|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Issue while inserting a BDC program in Inbound Proxy.JDBC-- PI-- SAP.

    The scenerio is jdbcsender-sappi-inboundproxy(ECC6.0).
    The issue is related to SAP Plant Maintenance Module where  We have a requirement for creating Maintenance item
    programmatically from (SQLDatabase)Legacy Data for one of the interface.
    since there are no standard BAPIS/Idocs or function modules available from SAP side for creating the maintenance item. So I
    have written BDC program and with the help of submit statement in inbound proxy program, I am calling BDC program for
    creation of the maintenance item.
    When I tested the program independently on proxy side  the Maintenance Item is getting created successfully but when I
    executed from end-to-end ie.  SQLDATABASE->SAP PI-->SAP. The message is getting strucked into the queue and queue  got stopped on SAP.
    ECC side and the status of the message is scheduled state  on SXMB_MONI  transaction of SAP ECC.
    As the message  is in scheduled state multiple number of Maintenance Items are getting created with the same values.
    Has any one of our SAP friends, encountered this type of issue while inserting a BDC program in inbound proxy, please help 
    in fixing this issue. FYI... I am using sap pi7.0 with service pack 24 and ecc6.0
    Waiting for your kind expert guidance...
    cheers,
    Ram

    Raj,
    Thanks for the reply. I have tried registering the queues but still the same problem. the message got stuck in the queue of ECC and showing below message in queue.
    function module                                    StatusText
    SXMS_ASYNC_EXEC                  connection closed (no data)
    I have checked in the forums especially  for this issue but no one has provided the answer for this.
    Thanks and Regards
    Ram

  • Short dump in MIGO and VL02N when upgrading from 46C to ECC 6.0

    Hello,
    We are doing an upgrade from R/3 46C to ECC 6.0 and we face a shortdump in trx MIGO (upon saving the document).
    DBIF_RSQL_INVALID_REQUEST
    a BKPF_INSERT in program SAPLF005
    The same shortdump happens when doing a Goods Issue on the SD side.
    Looking at the program, this is not modyfied so I guess it is a standard SAP error.
    OSS however, up to know did not respond to my message and there does not seem to be a SAP Note on this issue!
    Anyone had this problem before. How did they solve it.
    Thanks for any reply,
    Aart

    Posted in another forum

  • The BDC program for Transaction COGI not workign -need some alternative

    Hi,
         We are doing a SAP upgrade from 4.6c to ECC. One of the custom tcodes which were using BDC programming on COGI is now broken.Since , COGI is now changed in Ecc 6.0  with respect to the output which is now inALV and the earlier Date funtionaliy button is no more there in ECC6.0.
    We are still not to able to find relevant BAPI/function module/alternative for that matter.Rerecording COGI for new environment is not working since it involves alv call functions, which cannot be recorded in BDC.
    Please provide any inputs/valuable suggestions for same.

    HI
    You can try below method.
    there is one check box in COGI transaction named List Display. In your BDC recording, default that field value with 'X'.
    By activating this, list will be displayed as in earlier versions.
    Regards,
    Krishna Mohan

  • BDC programming error for FF67

    Hi guys,
    I am working on FF67 BDC programming. When I am uploading data from excel, allthe values are getting passed correctly, except in the second screen value-date field (here the date is dispalying as 02.12.2020, though I have given it as 02.12.2008)   And also it is displaying an error message as field FEBMKA-KWBTR(1) IS NOT AN INPUT FIELD. Am using ECC 6.0
    And in the output it is displaying like below
    statement/list is being updated atthe moment
    Field FEBMKA-VGMAN(1) is not an input field
    Field FEBEP-VALUT(1) is not an input field
    Field FEBMKA-KWBTR(1) is not an input field
    Warning: Values entered are ignored
    Statement/list saved.
    waiting for your reply guys.............
    Thank you in advance..
    Kiran

    Hi Avinash,
    Thanks for the reply. I didn't get you. How can I use 'write to' statement?
    I have written the code as follows
    CONCATENATE 'FEBMKA-VGMAN(' IDX ')' INTO FNAM.
          perform bdc_field       using FNAM
                                      itab-transaction.
          CALL FUNCTION 'CONVERSION_EXIT_PDATE_INPUT'
            EXPORTING
              INPUT  = itab-value_date
            IMPORTING
              OUTPUT = date.
          CONCATENATE 'FEBEP-VALUT(' IDX ')' INTO FNAM.
          perform bdc_field       using FNAM
                                         date.
          CONCATENATE 'FEBMKA-KWBTR(' IDX ')' INTO FNAM.
          perform bdc_field       using FNAM
                                         itab-amount.
          CONCATENATE 'FEBMKK-CHECT_KF(' IDX ')' INTO FNAM.
          perform bdc_field       using FNAM
                                         itab-bank_refchqno.
          So, where shall I use the '' write to'' statement.
          please suggest me.
    bye,
    Kiran

  • Upgrading from 46C to ECC 7.0

    Guys,
    My company is going to upgrade R/3 46C to ECC 7.0 later this year.  From the development (ABAP programs, any ABAP objects) standpoint, any suggestions on preparation, or what can be done in our current 46C environment to ensure a smooth transition from 46C to ECC (unicode, obsolete ABAP syntax, etc)?  Also any idea and recommendation on planning the upgrade, as well as things to watch out for are welcome.
    Thanks,
    Yan.

    First ECC 7.0 does not exist, so you will be upgrading to ECC 6.0.  And yes, you can start by doing a start for any calls to WS_UPLOAD and WS_DOWNLOAD.  You will need to change these calls to call the GUI_UPLOAD or GUI_DOWLOAD function modules.
    Other syntax issues will need to be handled after the upgrade, like using the ECODING extension on all OPEN DATASET statements.
    Regards,
    Rich Heilman

  • Does the background task support BDC program in Workflow?

    Hi Gurus,
    Environment:
    ECC 6.0
    WAS 640
    I've configured a task using Class method, in which a BDC program is called.
    When the task is set as background, it doesn't work. The workflow is suspended at this step.
    However,  when i unselected background option, it was all ok. The workitem is displayed in the mailbox, and can be executed through the mail box.
    The BDC mode is as follows,
      opt-dismode =  'N' .
      opt-updmode = 'S' .    
      opt-cattmode = 'N'.   
      opt-racommit = 'X'.
      opt-nobinpt = 'X'.
    Is it that the background task does not support BDC program?
    or any other reasons?
    Thanks.

    Hi,
    BDC will work in workflow. I done in one of my Project.
    Convert the BDC into FM and call it in workflow, Otherwise, in the FM call your BDC Program and map it workflow.
    Check the binding whether the values are passing or not.
    Regards,
    Surjith

  • Standard BDC program used for FI

    hi all ,
    i would like to know the standard BDC program used in FI , like for tcode fb01 or somethings else.
    Appreciate for any segguestion.
    thanks and regards.

    hi siddu m 
    thanks for replay ,
    i have anohter question
    provided the transaction A was contianed in the first batch file,
    and also  contained in the second batch file , how the tcode treated as the duplicate posting ?
    many thanks

  • Changes in BDC program to upload data from text/excel file

    Hi friends i have obtained the BDc program after recording :
    start-of-selection.
    perform open_group.
    perform bdc_dynpro      using 'SAPLCOIH' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CAUFVD-GSBER'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'AUFPAR-PM_AUFART'
                                  'PM01'.
    perform bdc_field       using 'CAUFVD-IWERK'
                                  '460a'.
    perform bdc_field       using 'CAUFVD-GSBER'
                                  '2460'.
    perform bdc_field       using 'CAUFVD-EQUNR'
                                  '10000009'.
    perform bdc_dynpro      using 'SAPLCOIH' '3000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'CAUFVD-KTEXT'
                                  'abc'.
    perform bdc_field       using 'CAUFVD-INGPR'
                                  'GM'.
    perform bdc_field       using 'CAUFVD-VAPLZ'
                                  'RTN_VELR'.
    perform bdc_field       using 'CAUFVD-VAWRK'
                                  '460A'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CAUFVD-GLTRP'.
    perform bdc_field       using 'CAUFVD-GSTRP'
                                  '1.8.2010'.
    perform bdc_field       using 'CAUFVD-GLTRP'
                                  '1.8.2010'.
    perform bdc_field       using 'CAUFVD-TPLNR'
                                  'RTNP-HIG'.
    perform bdc_field       using 'CAUFVD-EQUNR'
                                  '10000009'.
    perform bdc_field       using 'AFVGD-INDET'
                                  '1'.
    perform bdc_field       using 'AFVGD-WERKS'
                                  '460A'.
    perform bdc_field       using 'AFVGD-STEUS'
                                  'PMIN'.
    perform bdc_field       using 'AFVGD-ARBEH'
                                  'H'.
    perform bdc_field       using 'AFVGD-DAUNE'
                                  'H'.
    perform bdc_dynpro      using 'SAPLCOIH' '3000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CAUFVD-KTEXT'.
    perform bdc_field       using 'CAUFVD-KTEXT'
                                  'abc'.
    perform bdc_field       using 'CAUFVD-INGPR'
                                  'GM'.
    perform bdc_field       using 'CAUFVD-VAPLZ'
                                  'RTN_VELR'.
    perform bdc_field       using 'CAUFVD-VAWRK'
                                  '460A'.
    perform bdc_field       using 'CAUFVD-GSTRP'
                                  '01.08.2010'.
    perform bdc_field       using 'CAUFVD-GLTRP'
                                  '01.08.2010'.
    perform bdc_field       using 'CAUFVD-TPLNR'
                                  'RTNP-HIG'.
    perform bdc_field       using 'CAUFVD-EQUNR'
                                  '10000009'.
    perform bdc_field       using 'AFVGD-LTXA1'
                                  'abc'.
    perform bdc_field       using 'AFVGD-INDET'
                                  '1'.
    perform bdc_field       using 'AFVGD-ARBPL'
                                  'RTN_VELR'.
    perform bdc_field       using 'AFVGD-WERKS'
                                  '460A'.
    perform bdc_field       using 'AFVGD-STEUS'
                                  'PMIN'.
    perform bdc_field       using 'AFVGD-ARBEH'
                                  'H'.
    perform bdc_field       using 'AFVGD-DAUNE'
                                  'H'.
    perform bdc_transaction using 'IW31'.
    perform close_group.
    after executing it has two options.one is for call transactioin and other is for with session.Now i want to do the uploading from text file.Please guide me how to achieve that and what should be the order of fields in the text file.I am just a beginner.I know how to do that with LSMW bt trying BDc first time for creating PM orders

    You can use class "cl_gui_frontend_services". First you must select file with "file_open_dialog" method and the you can upload file with "gui_upload" method into internal table. Here is a sample: (I didn't try the code but I'm sure you can get it working, there are lots of sample codes about that. You can also search FM "GUI_UPLOAD").
    REPORT  zreport.
    DATA:
    gv_subrc TYPE sysubrc,
    gv_result TYPE abap_bool,
    gt_data_tab type table of zstruc.
    PARAMETERS: p_fname LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
        PERFORM file_open_dialog USING space space space space
                            CHANGING p_fname gv_action gv_subrc.
    START-OF-SELECTION.
    PERFORM gui_upload TABLES gt_data_tab
                     USING p_fname  CHANGING gv_subrc.
    *** FORMS ***
    FORM file_open_dialog USING pv_window_title
                                pv_default_extension
                                pv_default_filename
                                pv_initial_directory
                       CHANGING pv_filename
                                pv_user_action
                                pv_subrc.
      DATA:
      lt_file_table TYPE filetable,
      lv_rc         TYPE i,
      lv_initial_directory TYPE string.
      IF pv_initial_directory IS INITIAL.
        PERFORM get_desktop_directory CHANGING lv_initial_directory.
      ELSE.
        lv_initial_directory = pv_initial_directory.
      ENDIF.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = pv_window_title
          default_extension       = pv_default_extension
          default_filename        = pv_default_filename
    *     file_filter             =
    *     with_encoding           =
          initial_directory       = lv_initial_directory
    *     multiselection          =
        CHANGING
          file_table              = lt_file_table
          rc                      = lv_rc
          user_action             = pv_user_action
    *     file_encoding           =
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5
      pv_subrc = sy-subrc.
      IF pv_subrc EQ 0.
        READ TABLE lt_file_table INTO pv_filename INDEX 1.
      ENDIF.
    ENDFORM.
    FORM gui_upload TABLES pt_data_tab
                     USING pv_filename
                  CHANGING pv_subrc    TYPE sysubrc.
      DATA:
      lt_data_tab TYPE TABLE OF string,
      lv_filename TYPE string.
      lv_filename = pv_filename.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename                = lv_filename
          filetype                = 'ASC'
         has_field_separator     = 'X'
    *     header_length           = 0
    *     read_by_line            = 'X'
    *     dat_mode                = SPACE
    *     codepage                = SPACE
    *     ignore_cerr             = ABAP_TRUE
    *     replacement             = '#'
    *     virus_scan_profile      =
    *     show_transfer_status    = 'X'
    *   IMPORTING
    *     filelength              =
    *     header                  =
        CHANGING
          data_tab                = lt_data_tab
        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
          not_supported_by_gui    = 17
          error_no_gui            = 18
          OTHERS                  = 19
      pv_subrc = sy-subrc.
      IF pv_subrc EQ 0.
        pt_data_tab[] = lt_data_tab[].
      ENDIF.
    ENDFORM.

  • BDC Program is not working in background mode

    Hi All,
             I hv one bdc program for tcode fb02 which is working fine in foreground mode and data is updated to each screen properly. While running the same program in Background mode data is not updated. Can u seggust the solution.
    Regards,
    Rahul S

    Hi ,
    Remove the break point in the BDC performs.
    put the break point once u complete the BDC.... otherwise execute the BDC in MODE 'E'.. error mode.
    regards,
    Rama Reddy
    Edited by: ram reddy on Nov 16, 2009 5:37 AM

  • BDC program is not working in BI Production.

    Dear All,
    My BDC program for RSA1 is working fine in BI Development, but it is not working in BI Production. I have debug the BDC program and found that data is coming from the excel file. Then why it is not working. Please help me.
    Thanks,
    With regards,
    Rosaline.

    Hi all, the problem is now solved.
    With regards,
    Rosaline.

  • Questions on BDC program statements.....

    Hi,
    Currently i am checking below BDC program for packing material use.
    But there is a statement that i am not very clear what it is for...
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-EXIDV(01)'.
    For the  'V51VE-EXIDV(01)', here why need to add an (01) at the end.  What does the (01) means??
    Thanks!!!!
      LOOP AT i_lips.
        CLEAR: i_bdc_tab,i_msg_tab.
        REFRESH: i_bdc_tab,i_msg_tab.
        PERFORM bdc_dynpro      USING 'SAPMV50A' '4004'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LIKP-VBELN'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LIKP-VBELN'
                                      i_lips-vbeln.
        PERFORM bdc_dynpro      USING 'SAPMV50A' '1000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=VERP_T'.
    *perform bdc_field       using 'LIKP-BLDAT'
    *                              record-BLDAT_002.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LIPS-POSNR(01)'.
    *perform bdc_field       using 'LIKP-WADAT'
    *                              record-WADAT_003.
    *perform bdc_field       using 'LIKP-WAUHR'
    *                              record-WAUHR_004.
    *perform bdc_field       using 'LIKP-BTGEW'
    *                              record-BTGEW_005.
    *perform bdc_field       using 'LIKP-GEWEI'
    *                              record-GEWEI_006.
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-VHILM(01)'.
        PERFORM bdc_field       USING 'V51VE-VHILM(01)'
                                      'BOX'.
    *Select all materails
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=HU_MARKA'.
    *Select all Boxes
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=HUMARKHU'.
    *perform bdc_field       using 'V51VE-SELKZ(01)'
    *                              record-SELKZ_01_008.
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=HU_VERP'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-EXIDV(01)'.
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SICH'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-EXIDV(01)'.
        CALL TRANSACTION 'VL02N' USING i_bdc_tab
                          MODE p_mode
                          MESSAGES INTO i_msg_tab.
    Message was edited by:
            Hoo Laa

    And if this is a BDC running in background, or a call transaction, then placing the cursor on a given field has no effect unless it is needed for navigation to the next screen. 
    When you record a BDC using SHDB there are a lot of statements like this that are added in but are not needed for the BDC to work. 
    Another example is the "BDC_SUBSCR" field name - this does not in most cases appear to have any effect on how the BDC is processed.
    Also, the recording will include fields which have default values on the screen that you do not need to overwrite with the same value from the BDC.
    I often delete these statements from the recording, taking care that I understand what the impact is.  You can try commenting out the line and see what difference it makes to processing. 
    When using a BDC for updating a lot of records, having less of these types of lines in the BDCDATA table will speed performance a bit.
    Andrew

  • Running BDC program in background for the transaction VL02N

    Hi All,
    I have coded a BDC program (call transaction method) for the transaction code VL02N. I can able to run the program manually & successfully. But if I execute the program in background(SM36), it is going to dump giving CNTL_ERROR.
    Note: I am not using any of the GUI_UPLOAD, GUI_DOWNLOAD funciton modules in the program. But I am using the FTP command funtion modules like( FTP_COMMAND, FTP_CONNECT, FTP_DISCONNECT and FTP_SERVER_TO_R/3).
    <removed_by_moderator>
    Thanks in advance.
    Ramesh.
    Edited by: Julius Bussche on Jul 8, 2008 5:55 PM

    VL02N is an enjoy transaction. You cant run it in background. Please try VL02.
    Thanks
    Romit

  • How can we know the return code of BDC Program ?

    Hi All,
    Please tell me : How can we know the return code of BDC Program when being exceuted in Session or in Transaction mode.
    In my program, we are uploading data from Excel sheet to SAP via BDC
    The records that are not updated we want to create a log file.
    Now to know whether a record is updated ot not, wat syst field shloud be used?
    Its urgent....
    <b>Reward Point will be there ....</b>
    Thanks,
    Harish

    Hi harish,
    try the logic in this code ...
    i had attached input file in the end.
    TYPES: begin of errmess,
            msgnr type t100-msgnr,
            text type t100-text,
           end of errmess.
    TABLES : t100.
    DATA: BEGIN OF DD_VA01,
           AUART TYPE VBAK-AUART,
           KUNNR TYPE RV45A-KUNNR,
           BSTKD TYPE VBKD-BSTKD,
           MABNR TYPE RV45A-MABNR,
           KWMENG(2) type C,
           KBETR(2) type C,
          END OF DD_VA01.
    DATA:IT_VA01     Like TABLE OF DD_VA01,
         WA_VA01     Like LINE  OF IT_VA01,
         WA_VA01_F   Like LINE  OF IT_VA01,
         IT_BDCDATA  TYPE TABLE OF BDCDATA,
         WA_BDCDATA  Like Line  OF IT_BDCDATA,
         W_FNAME     TYPE STRING,
         messtab like bdcmsgcoll occurs 0 with header line,
         it_errmess type table of errmess,
         wa_errmess like line of it_errmess,
         err_message type string.
    data: zf1 type i,
          zc1 type c value '2',
          fn(20) type c.
    Main Code ************************************************************
    PERFORM get_input using 'C:\Documents and Settings\ic881592\Desktop\Daran_bdc_VA01-e.txt'.
    SORT IT_VA01 BY AUART KUNNR BSTKD.
    LOOP AT IT_VA01 INTO WA_VA01.
      if WA_VA01_F-AUART <> WA_VA01-AUART OR
         WA_VA01_F-KUNNR <> WA_VA01-KUNNR OR
         WA_VA01_F-BSTKD <> WA_VA01-BSTKD.
           PERFORM set_header_flag.
           PERFORM create_bdc_header_data.
      endif.
      PERFORM create_bdc_item_data.
    ENDLOOP.
    PERFORM call_transaction.
    PERFORM errorlog.
    Procedures ***********************************************************
    form get_input using w_fname.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = W_FNAME
          HAS_FIELD_SEPARATOR = '#'
        TABLES
          DATA_TAB            = IT_VA01.
    endform.
    form call_transaction.
        PERFORM bdc_field       using 'BDC_OKCODE' '/11'.
        CALL TRANSACTION 'VA01' USING IT_BDCDATA MODE 'A' messages into messtab.
        refresh it_bdcdata.
    endform.
    FORM set_header_flag.
           WA_VA01_F-AUART = WA_VA01-AUART.
           WA_VA01_F-KUNNR = WA_VA01-KUNNR.
           WA_VA01_F-BSTKD = WA_VA01-BSTKD.
           if zf1 = 1.
               PERFORM call_transaction.
           endif.
           zf1 = 1.
    endform.   "set_header_flag.
    form create_bdc_header_data.
         perform bdc_dynpro      using 'SAPMV45A' '0101'.
         perform bdc_field       using 'VBAK-AUART' WA_VA01-AUART.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         perform bdc_field       using 'KUAGV-KUNNR' WA_VA01-KUNNR.
         perform bdc_field       using 'VBKD-BSTKD' WA_VA01-BSTKD.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMSSY0' '0120'.
         perform bdc_field       using 'BDC_CURSOR' '04/06'.
         perform bdc_field       using 'BDC_OKCODE' '=CHOO'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    endform. "create_bdcdata
    FORM create_bdc_item_data.
         CONCATENATE 'RV45A-KWMENG(' zc1 ')' INTO FN.
         perform bdc_field       using 'BDC_CURSOR' FN.
         perform bdc_field       using FN WA_VA01-KWMENG.
         CONCATENATE 'KOMV-KBETR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-KBETR.
         CONCATENATE 'RV45A-MABNR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-MABNR.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    ENDFORM.
    form errorlog.
      LOOP AT MESSTAB .
        if MESSTAB-MSGNR = '311' or MESSTAB-MSGTYP = 'E'.
            SELECT SINGLE msgnr text FROM T100
                            into wa_errmess
                            WHERE SPRSL = MESSTAB-MSGSPRA
                              AND ARBGB = MESSTAB-MSGID
                              AND MSGNR = MESSTAB-MSGNR.
            IF SY-SUBRC = 0.
              err_message = wa_errmess-TEXT.
              IF err_message CS '&1'.
                REPLACE '&1' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&2' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&3' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&4' WITH MESSTAB-MSGV4 INTO err_message.
              ELSE.
                REPLACE '&' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV4 INTO err_message.
              ENDIF.
              CONDENSE err_message.
              WRITE: / MESSTAB-MSGTYP, err_message .
            ELSE.
              WRITE: / MESSTAB.
            ENDIF.
        endif.
      ENDLOOP.
    endform. "errorlog
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      WA_BDCDATA-PROGRAM  = PROGRAM.
      WA_BDCDATA-DYNPRO   = DYNPRO.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    input file :
    OR     2148     0001235     R-1162     8     17
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     6     25
    OR     2148     0001235     R-1162     4     12
    OR     2148     0001236     R-1162     3     12
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     1     25
    OR     2148     0001236     R-1162     7     12
    OR     2148     0001236     R-1161     8     30
    OR     2148     0001236     100-400     10     25
    OR     2148     0001235     R-1161     5     30
    OR     2148     0001235     100-400     2     25
    OR     2148     0001235     R-11621     3     12
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     1     25
    OR     2148     0001235     R-1162     7     12
    OR     2148     0001235     R-1161     8     30
    OR     2148     0001235     100-400     10     25
    OR     2148     0001236     R-1162     8     17
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     6     25
    OR     2148     0001236     R-1162     4     12
    OR     2148     0001236     R-1161     5     30
    OR     2148     0001236     100-400     2     25

Maybe you are looking for

  • Safari for Windows 7 - Where can I get a safe download?

    I want to download Safari for my Windows 7 PC.  I cannot find 5.1.7 on the Apple website.  Is that the one that I should be looking for?  If so, where can I get a download of it that won't include a bunch of garbage. Or, if there is a version that I

  • How to burn albums in iPhoto with external DVD drive?

    I have the new iMac which doesn't contain a DVD drive... so I bought an external DVD drive and I am trying to burn albums from iPhoto but in the "share" option, the "burn to disc" option doesn't come up. It's as if iPhoto doesn't recognize a DVD driv

  • Startup disk application memory issue

    Brand new imac with solid state 250GB as startup (200 used) and 2TB as number 2. The force quit dialogue box keeps coming up asking me to quit applications (even when just running mail) saying i have no more space. 50 GB still available on the drive.

  • Error 34 when trying to create a DVD?

    I have produced a HD project in iMovie but when I try to create a DVD I get the error message 34.

  • Define Mail to Purchasing When Price Variances Occur

    Hi all ; I try to implement 'Define Mail to Purchasing When Price Variances Occur' standart process. But i have not got an e-mail. Is there anything else ? Steps : 1- Configuration of process that it is activated for related company code. 2- Message