Hi all -- dialogue prog bdc

hi all
i have records in itab in dialogue program, now these records needs to be uploaded in sap via bdc prog.
how to upload itab records in dialogue program using bdc??
the problem i am facing is, it does not accept
FORM bdc_dynpro
FORM bdc_field
in dialogue program.
Therefore my question is how should i proceed to upload data in sap from dialogue program internal table??
thanx
rocky

Hi,
keep those subroutines in the main program or in some include.don't keep them inside the module.
rgds,
bharat.

Similar Messages

  • Dialogue prog  F4 help should show calender

    hi all
    i have a input field in dialogue prog se51, i have to get calender for this field when the user press F4.
    i am using only ztable fields in dialogue prog.
    how to get calender for ztable field when F4 is pressed???
    thanx
    rocky
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 4:06 PM

    You can use FM 'F4_DATE' for displaying the calender.
    Check the sample code
    FU F4_DATE
    Short text
        Display factory calendar or Gregor. calendar and choose a day
         see also the parameter documentation (long texts).
    Parameter
        DATE_FOR_FIRST_MONTH
        DISPLAY
        FACTORY_CALENDAR_ID
        GREGORIAN_CALENDAR_FLAG
        HOLIDAY_CALENDAR_ID
        PROGNAME_FOR_FIRST_MONTH
        SELECT_DATE
        SELECT_WEEK
        SELECT_WEEK_BEGIN
        SELECT_WEEK_END
    Exceptions
        CALENDAR_BUFFER_NOT_LOADABLE
        DATE_AFTER_RANGE
        DATE_BEFORE_RANGE
        DATE_INVALID
        FACTORY_CALENDAR_NOT_FOUND
        HOLIDAY_CALENDAR_NOT_FOUND
        PARAMETER_CONFLICT
    This is the sample code
    DATA: DATE TYPE D.
    CALL FUNCTION 'F4_DATE'
         IMPORTING
              SELECT_DATE = DATE.
    Regards

  • MODULE POOL / MODULE PROGRAMMING / DIALOGUE PROG.

    Hello to the Experts!!
    I need to know what's the diffrences among
    1.) Module Pool
    2.) Module Programming
    3.) Dialogue Prog.
    If they are different from each other, I want to learn each of them.
    Kindly provide me all the materials to master them.
    Looking forward to your huge responses.
    Thanks!!

    Hi,
    <i><b>I need to know what's the diffrences among
    1.) Module Pool
    2.) Module Programming
    3.) Dialogue Prog.</b></i>
    All the 3 are the same.
    For the docs.
    Refer
    new to module pool program
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://www.thespot4sap.com/Articles/SAP_Design_Dynpro.asp
    check this link:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBTUT/BCDWBTUT.pdf
    http://help.sap.com/saphelp_40b/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/applet.htm
    Have a look at these good links-
    http://www.allsaplinks.com/dialog_programming.html
    http://sap.mis.cmich.edu/sap-abap/abap09/
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://sap.mis.cmich.edu/abap-00/
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://help.sap.com
    http://www.sapgenie.com/abap/example_code.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://www.allsaplinks.com/dialog_programming.html
    http://www.sapbrain.com/TUTORIALS/default.html
    http://www.sappoint.com/abap/spmp.pdf
    http://sappoint.com/abap.html
    http://www.sap-img.com/abap.htm
    http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/abap/
    http://www.sap-img.com/
    http://www.sappoint.com/faq/faqdiapr.pdf
    http://www.allsaplinks.com/dialog_programming.html
    http://www.sapgenie.com/abap/example_code.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    Regards,
    Deepu.K

  • How do I permanently delete music files from itunes AND my  computer (without going to the folder to delete each item)? It's a windows system. I've tried 'reset all dialogue warnings' as I've been told to do but no luck. Files are still in Itunes folders.

    How do I permanently delete music files from itunes AND my  computer (without going to the folder to delete each item)? It's a windows system. I've tried 'reset all dialogue warnings' as I've been told to do but no luck. Files are still in Itunes folders. I would really appreciate help!

    Solved! Music was in Itunes folder but not in Media folder within that. It doesn't seem like a very user friendly system so far!

  • Hi, all standard prog of sap

    hi
    i want to know how to find all standard prog of sap or in the other word if i am given any prog to develope how would i know that prog is already there in the sap.
    for ex.
    when i am developing a prog that shows list of PO for a mat from diff. vendors, this prog is not needed to be developed as it is already there in the sap, but i do not know how to find such programs in sap .
    could any please guide me on this
    thanx
    rocky

    Hi,
    In SAP Easy Access menu, go to Extras -> Settings -> and select checkbox display technical names.
    Now in the easy acess menu, all the modules has node which says 'Reporting' or 'Information Systems', these refer to the standard SAP reports.
    Go through them or try to find out in which table these report names are saved.
    Regards
    Subramanian

  • Hi All,Issue regarding bdc for capturing error records,its urgent

    Hi All,
            My requirement is to capture the error record and download the error record to a flat file .
    I have done recording for MM01 transaction .
    I am getting a problem like no error records are downloaded into the flat file .It is downloading only the empty records.
    Pls see the below code which i developed & modify it for any changes .Its an urgent .Pls provide me the solution ASAP.
    My Flat file
    M     FERT     X     MATL105     KG     
    X     FERT     X     MATL106     KG
    In the above flat file 'X' is an Industry sector which doesnot exists which is an error record that has to be captured and download it into the flat file .
    Source code :
    report Z_MM01_MSG_F MESSAGE-ID MSG1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record occurs 0,
    data element: MBRSH
            MBRSH_001(001),
    data element: MTART
            MTART_002(004),
    data element: XFELD
            KZSEL_01_003(001),
    data element: MAKTX
            MAKTX_004(040),
    data element: MEINS
            MEINS_005(003),
    data element: MTPOS_MARA
            MTPOS_MARA_006(004),
          end of record.
    *DECLARATION OF BDCDATA STRUCTURE
    DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE .
    *declaration to store the message
    DATA: IT_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE .
    *DECLARATION TO STORE THE MESSAGE
    DATA: BEGIN OF IT_STORE_MSG OCCURS 0,
          STORE(1000),
          END OF IT_STORE_MSG.
    *declaration SUCCESS MESG
    DATA: BEGIN OF IT_SUCCESS OCCURS 0,
          SUCCESS_REC(10),
          MBRSH(10),
          TABIX LIKE SY-TABIX,
          END OF IT_SUCCESS.
    *declaration ERROR MESSAGE
    DATA: BEGIN OF IT_ERROR  OCCURS  0,
          ERROR_REC(10),
          MBRSH(10),
             TABIX LIKE SY-TABIX,
          END OF IT_ERROR.
    DATA:TABIX LIKE SY-TABIX.
    *validating Material type(mtart) field data with table T134
    data : v_type like T134-mtart.
    DATA: V_INDSECT LIKE MARA-MBRSH.
    End generated data section ***
    start-of-selection.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      TABLES
        data_tab                      = record
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    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_dataset using dataset.
    perform open_group.
    LOOP AT RECORD.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *- Validating industry sector(MBRSH) from the master table(MARA)
    select single MBRSH from T137  into V_INDSECT where MBRSH eq
    record-MBRSH_001.
    IF SY-SUBRC EQ 0.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_001.
    *endif.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_002.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_003.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_004.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_005.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_006.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    *ELSE.
    *message  E000 WITH 'Industry sector does not Exist' .
    *endif.
    LOOP AT MESSTAB.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = MESSTAB-MSGID
       LANG            = MESSTAB-MSGSPRA
       NO              = MESSTAB-MSGNR
       V1              = MESSTAB-MSGV1
       V2              = MESSTAB-MSGV2
      V3              = SY-MSGV3
      V4              = SY-MSGV4
    IMPORTING
       MSG             = IT_STORE_MSG-STORE
       EXCEPTIONS
      NOT_FOUND       = 1
       OTHERS          = 0.
    IF MESSTAB-MSGTYP = 'S'.
       IT_SUCCESS-SUCCESS_REC = IT_STORE_MSG-STORE.
       IT_SUCCESS-MBRSH = record-MBRSH_001.
       IT_SUCCESS-TABIX = TABIX.
       APPEND IT_SUCCESS.
       ELSEIF  MESSTAB-MSGTYP = 'E'.
       IT_ERROR-ERROR_REC = IT_STORE_MSG-STORE.
       IT_ERROR-MBRSH = record-MBRSH_001.
       IT_ERROR-TABIX = TABIX.
      APPEND IT_ERROR.
    ENDIF.
    endloop.
    endif.
    ENDLOOP.
    CALL FUNCTION 'DOWNLOAD'
      TABLES
        DATA_TAB                      = IT_error
      FIELDNAMES                    =
    EXCEPTIONS
      INVALID_FILESIZE              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    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 close_group.
    *perform close_dataset using dataset.

    Hi,
    DATA: IT_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE .
    CALL FUNCTION 'DOWNLOAD'
    TABLES
    DATA_TAB = IT_error
    FIELDNAMES =
    EXCEPTIONS
    INVALID_FILESIZE = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    instead of using IT_error ion tables use IT_MESSTAB.
    <REMOVED BY MODERATOR>
    Code Formatted by: Alvaro Tejada Galindo on Apr 9, 2008 5:07 PM

  • Ver.5.0.1.exe does not install even if all firefox prog. are closed

    on installation process, the install popbox says checking existing programs after which another popbox says close all firefox programs before installation....
    I have closed all applications and programs prior to installation of the downloaded ver 5.0.1.exe but only this took up my time and nothing happened
    mary elizabeth

    Well, the behavior I described is now intermittent. Sometimes I can open a new window and sometimes I can't. If I can't, command-Tab does nothing. So far I've found no consistent circumstances under which I can or can't open a new window.
    Originally I was running computationally intensive program that required 3.35 days to complete its run. When the run was over the Firefox problem disappeared - for awhile. Then the problem recurred in the intermittent fashion I've described.

  • Suddenly i cannot see all my progs i already bought on my ipad, not installed or uninstalled. What do i have to do to see everything like it used to be. Note: i did not hide any progs from the list.

    Problem solved: i just set some apps to 'hide' and then again 'unhide'. All my apps suddenly were back :-)

    Problem solved: i just set some apps to 'hide' and then again 'unhide'. All my apps suddenly were back :-)

  • HI ALL- DIALOG PROG

    HI
    I WOULD LIKE TO KNOW HOW TO PASS NEGATIVE VALUE TO AN INTERNAL TABLE FIELD IN DIALOG PROGRAM.
    I HAVE TABLE CONTROL IN THAT WHOLE INTERNAL TABLE FIELDS ARE INPUT AND OUT ENABLED,, BUT IT IS NOT ALLOWING NEGATIVE VALUES IN FIELDS.
    WHAT TO DO TO TAKE NEGATIVE VALUE IN DIALOG PROGRAM??
    THANX IN ADVANCE
    ROCKY

    In the table control field
    double click on the cell , and give the text as "_________________V" and make sure it is Quan field format. in the attributes.
    then it iwll allow negative values.

  • Selection Screen for Loading Z Prog

    Hi All,
    I am looking for help fr experienced ppl....
    In Tcode : SLIN.. there is "Call Function Interface Error" .. I have a master list of all Z prog. how can i show only those Z prog fr the master file as output whcih are having this Error "Call Function Interface Error " in it..rather then going through each and every prog 1 by 1..to check..
    I have to use a bdc whcih woudl run in background and would give the output required.
    OR
    I cn use a selection screen which would load all the Z prog fr d master file and output only those which are having this Error "Call Function Interface Error"
    Looking forward for Help..

    You have a high level solution.
    Please go to transaction SCI and use help button. There is also a good section in online help at [http://help.sap.com/saphelp_erp60_sp/helpdata/EN/56/fd3b87d203064aa925256ff88d931b/frameset.htm|http://help.sap.com/saphelp_erp60_sp/helpdata/EN/56/fd3b87d203064aa925256ff88d931b/frameset.htm]
    If you have any specific questions please post them in this thread.

  • Hi all   dialog program   experts no solution coming

    hi all
    i would like to know if there any program where coding for below icon is available (not in alv or oops), where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
    i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality of icons in dialogue prog and not how to display icons ).
    thanx
    rocky

    hi all
    i would like to know if there any program where coding for below icon is available (not in alv or oops), where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
    i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality of icons in dialogue prog and not how to display icons ).
    thanx
    rocky

  • BDC for

    Hi All,
    I am looking for help fr  experienced ppl....
    In Tcode : SLIN.. there is "Call Function Interface Error" .. I have a master list of all Z prog. how can i show only those Z prog fr the master file as output whcih are having this Error "Call Function Interface Error " in it..rather then going through each and every prog 1 by 1..to check..
    I have to use a bdc whcih woudl run in background and would give the output required.
    OR
    I cn use a selection screen which would load all the Z prog fr d master file and output only those which are having this Error "Call Function Interface Error"
    Looking forward for Help..

    Please remember it this time as well. Textspeak is difficult for people past their teens to translate. And you do want help from "experienced" people don't you?
    Rob

  • Issue in BDC while uploading vendors in FK01 when processing mode is N

    Hello all,
    Created a BDC program for uploading vendors using FK01 and it was working fine in both the modes ( A and N). A new requirement came for which few postal codes will have tax mandatory jurisdiction code. After entering the adderss details in screen    'SAPMF02K' '0110' , a pop up box appers with the list of jurisdiction code for few postal codes. We need to select the first record and proceed (     'SAPMSSY0' '0120'.) .  This works perfectly in foreground.
    And I know that these pop up diaglog boxes will not appear in background mode.
    Can anyone help me in solving this. The pop up box displays the jurisdiction code from the structure TAX_TXJCD_POPUP_ADDRESS .
    below is the code sinnipet.
        PERFORM bdc_dynpro      USING 'SAPMSSY0' '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR' '04/96'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'LFA1-KUNNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
    Thanks & Regards,
    Sinthu

    Hi,
    I used the FM  "TAX_TXJCD_DETERMINE_TABLE" to get the tax jurisdiction code for a postal code and i passed it accordingly. Still I get the same error. Here is the code before and after the change.
    Before:
              PERFORM bdc_dynpro      USING 'SAPMSSY0' '0120'.
           PERFORM bdc_field       USING 'BDC_CURSOR' '04/03'.   "  for F4
            PERFORM bdc_field       USING 'BDC_OKCODE' '=ENTR'.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR' 'LFA1-KUNNR'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
    After using the FM:
          CALL FUNCTION 'TAX_TXJCD_DETERMINE_TABLE'
          EXPORTING
            im_country                   =  gw_data-land1
            im_region                    =  gw_data-regio
            im_zipcode                   =  gw_data-pstlz
    *   IM_CITY                      = ' '
    *   IM_COUNTY                    = ' '
          TABLES
            t_jurtab                     =  gi_taxcode
    * EXCEPTIONS
    *   INPUT_INCOMPLETE             = 1
    *   NO_TAX_PROCEDURE             = 2
    *   NO_TAXJURCODE_REQUIRED       = 3
    *   RFCDEST_NOT_FOUND            = 4
    *   TAXJURCODE_NOT_FOUND         = 5
    *   OTHER_ERROR                  = 6
    *   OTHERS                       = 7
        clear gw_taxcode.
        IF gi_taxcode IS NOT INITIAL.
          READ TABLE gi_taxcode INTO gw_taxcode INDEX 1.
          IF sy-subrc IS INITIAL.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR' 'LFA1-KUNNR'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
            PERFORM bdc_field       USING 'LFA1-TXJCD' gw_taxcode-txjcd.
          endif.
    endif.
    Where am I going wrong? I am getting the value for txjcd.

  • BDC for ME21 Po create

    Hi ALL,
    Iam Creating BDC Program bu using ME21 for Uploading PO.
    Iam getting error at Income term2 in the Second Screen of ME21. Iam Passing this value through Excel Sheet But event then it is not picking. When i check in debugging the value of income term2 is populating.
    Let me know what are the mandotory fields for creating PO using Me21.
    Here iam also attaching the code, Please help us because it is very urgent.
    report ZPOUPLOADME21
    no standard page heading line-size 255.
    *include bdcrecx1.
    INCLUDE YMM_BDCRECX1.
    •     Internal Table T_BDCDATA to store BDC data
    •     Batchinputdata of single transaction
    DATA: T_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    •     Internal Table T_BDC_MSG to store BDC messages
    DATA: T_BDC_MSG LIKE STANDARD TABLE OF BDCMSGCOLL INITIAL
    SIZE 0 WITH HEADER LINE.
    DATA: V_FILE LIKE RLGRAP-FILENAME ,
    V_COUNT(5) TYPE C,
    V_MESSAGE_CNT(5) TYPE C .
    DATA : BEGIN OF IT_DATA OCCURS 0,
    LIFNR LIKE EKKO-LIFNR, " Vendor
    BSART LIKE RM06E-BSART, " Order Type
    BEDAT(10) TYPE C, " Date
    EKORG LIKE EKKO-EKORG, " Purchasing Organization
    EKGRP LIKE EKKO-EKGRP, " Purchasing Group
    WERKS LIKE RM06E-WERKS, " Plant
    INCO2 LIKE EKKO-INCO2, " Inco Terms
    KNTTP LIKE EKPO-KNTTP, " A/C Assignment Category
    EMATN LIKE EKPO-EMATN, " Material Number
    MENGE LIKE EKPO-MENGE, " Purchase Order Quantity
    NETPR LIKE EKPO-NETPR, " Net Price
    MWSKZ LIKE EKPO-MWSKZ, " Tax Code
    NPLNR LIKE MSEG-NPLNR, " Network
    VORNR LIKE PSORDER-VORNR, " Operation
    END OF IT_DATA.
    START-OF-SELECTION.
    PERFORM OPEN_GROUP.
    PERFORM DATA_UPLOAD.
    PERFORM CALL_TRANSACTION.
    PERFORM CLOSE_GROUP.
    PERFORM WRITE_ERROR.
    *& Form DATA_UPLOAD
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM DATA_UPLOAD.
    *call function ws_upload to retrieve data from a flat file in the
    *presentation server into an internal table
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILENAME = V_FILE
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = IT_DATA
    EXCEPTIONS
    CONVERSION_ERROR = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    •     if ws_upload fails then display appropriate message
    IF SY-SUBRC 0.
    •     MESSAGE E000 WITH 'Data not Uploaded into internal table'.
    ENDIF.
    ENDFORM. " DATA_UPLOAD
    *& Form CALL_TRANSACTION
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM CALL_TRANSACTION.
    DATA : V_IVDAT(10) TYPE C,
    V_AKTIV(10) TYPE C,
    V_MESSAGE(404) TYPE C.
    REFRESH T_BDCDATA.
    CLEAR T_BDCDATA.
    V_COUNT = 0.
    V_MESSAGE_CNT = 0.
    LOOP AT IT_DATA .
    V_COUNT = V_COUNT + 1.
    *perform open_group.
    perform bdc_dynpro using 'SAPMM06E' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RM06E-WERKS'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'EKKO-LIFNR'
    IT_DATA-LIFNR.
    perform bdc_field using 'RM06E-BSART'
    IT_DATA-BSART.
    *perform bdc_field using 'RM06E-BEDAT'
    •     '24.01.2008'.
    perform bdc_field using 'RM06E-BEDAT'
    IT_DATA-BEDAT.
    perform bdc_field using 'EKKO-EKORG'
    IT_DATA-EKORG.
    perform bdc_field using 'EKKO-EKGRP'
    IT_DATA-EKGRP.
    *perform bdc_field using 'RM06E-LPEIN'
    •     'T'.
    perform bdc_field using 'RM06E-WERKS'
    IT_DATA-WERKS.
    perform bdc_dynpro using 'SAPMM06E' '0101'.
    perform bdc_field using 'BDC_CURSOR'
    'EKKO-INCO2'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKKO-EKGRP'
    •     IT_DATA-EKGRP1. "'SP3'.
    *perform bdc_field using 'EKKO-PINCR'
    •     IT_DATA-PINCR. "'10'.
    *perform bdc_field using 'EKKO-SPRAS'
    •     IT_DATA-SPRAS. "'EN'.
    *perform bdc_field using 'EKKO-UPINC'
    •     IT_DATA-UPINC. "'1'.
    *perform bdc_field using 'EKKO-ZTERM'
    •     IT_DATA-ZTERM.
    *perform bdc_field using 'EKKO-WAERS'
    •     IT_DATA-WAERS. "'INR'.
    *perform bdc_field using 'EKKO-ZBD1T'
    •     IT_DATA-ZBD1T. "'44'.
    *perform bdc_field using 'EKKO-WKURS'
    •     IT_DATA-WKURS. "' 1.00000'.
    *perform bdc_field using 'EKKO-INCO1'
    •     IT_DATA-INCO1.
    perform bdc_field using 'EKKO-INCO2'
    IT_DATA-INCO2.
    perform bdc_dynpro using 'SAPMM06E' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'EKPO-NETPR(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKPO-KNTTP(01)'
    •     'N'.
    perform bdc_field using 'EKPO-KNTTP(01)'
    IT_DATA-KNTTP.
    perform bdc_field using 'EKPO-EMATN(01)'
    IT_DATA-EMATN.
    perform bdc_field using 'EKPO-MENGE(01)'
    IT_DATA-MENGE.
    perform bdc_field using 'EKPO-NETPR(01)'
    IT_DATA-NETPR.
    perform bdc_dynpro using 'SAPMM06E' '0111'.
    perform bdc_field using 'BDC_CURSOR'
    'EKPO-MWSKZ'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    *perform bdc_field using 'EKPO-KNTTP'
    •     'N'.
    *perform bdc_field using 'EKPO-TXZ01'
    •     'Clamps & Connector'.
    *perform bdc_field using 'EKPO-MENGE'
    •     '4'.
    *perform bdc_field using 'EKPO-SPINF'
    •     'A'.
    *perform bdc_field using 'EKPO-NETPR'
    •     '100.00'.
    *perform bdc_field using 'EKPO-PEINH'
    •     '1'.
    *perform bdc_field using 'EKPO-BPRME'
    •     'NO'.
    *perform bdc_field using 'EKPO-BPUMN'
    •     '1'.
    *perform bdc_field using 'EKPO-BPUMZ'
    •     '1'.
    *perform bdc_field using 'EKPO-PRSDR'
    •     'X'.
    *perform bdc_field using 'RM06E-EEIND'
    •     '24.01.2008'.
    *perform bdc_field using 'RM06E-LPEIN'
    •     'D'.
    *perform bdc_field using 'EKPO-WEPOS'
    •     'X'.
    perform bdc_field using 'EKPO-MWSKZ'
    IT_DATA-MWSKZ.
    *perform bdc_field using 'EKPO-REPOS'
    •     'X'.
    perform bdc_dynpro using 'SAPMM06E' '0511'.
    perform bdc_field using 'BDC_CURSOR'
    'EKKN-SAKTO'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTE'.
    *perform bdc_field using 'EKKN-SAKTO'
    •     '6034025'.
    *perform bdc_field using 'DKACB-FMORE'
    •     'X'.
    perform bdc_dynpro using 'SAPLKACB' '0002'.
    *perform bdc_field using 'BDC_CURSOR'
    •     'COBL-VORNR'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTE'.
    perform bdc_field using 'COBL-NPLNR'
    IT_DATA-NPLNR.
    perform bdc_field using 'COBL-VORNR'
    IT_DATA-VORNR.
    perform bdc_dynpro using 'SAPMM06E' '0111'.
    perform bdc_dynpro using 'SAPMM06E' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'RM06E-EBELP'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    *perform bdc_field using 'RM06E-EBELP'
    •     '10'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    perform bdc_transaction using 'ME21'.
    perform close_group.
    LOOP AT T_MESSTAB WHERE REC_NO IS INITIAL.
    AT FIRST.
    V_MESSAGE_CNT = V_MESSAGE_CNT + 1.
    T_MESSTAB-REC_NO = V_COUNT.
    ENDAT.
    MODIFY T_MESSTAB TRANSPORTING REC_NO.
    ENDLOOP.
    REFRESH T_BDCDATA.
    CLEAR T_BDCDATA.
    ENDLOOP.
    SKIP.
    WRITE : /10 'Record Number ', 30 'Error Message'.
    SKIP.
    endform.
    *& Form WRITE_ERROR
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM WRITE_ERROR.
    LOOP AT T_MESSTAB.
    WRITE : /10 T_MESSTAB-REC_NO , 30 T_MESSTAB-MESSAGE.
    ENDLOOP.
    ULINE /10(100).
    WRITE : /10 'No of Records : ' , V_COUNT.
    WRITE : /10 'No of Erroneous Records : ' , V_MESSAGE_CNT.
    ULINE /10(100).
    ENDFORM. " WRITE_ERROR
    *& Form CHECK_BDC
    •     text
    •     --> p1 text
    •     <-- p2 text
    FORM CHECK_BDC.
    DATA: L_CHECK LIKE YMMT_CHECK_BDC-YCHECK.
    SELECT SINGLE YCHECK INTO L_CHECK FROM YMMT_CHECK_BDC
    WHERE PROGRAMM EQ SY-REPID
    AND YCHECK EQ 'X'.
    IF SY-SUBRC NE 0.
    MESSAGE S000(YM) WITH 'Execution not possible'.
    STOP.
    ENDIF.
    ENDFORM. " CHECK_BDC
    <REMOVED BY MODERATOR>
    Thanks
    Rahul
    Edited by: Alvaro Tejada Galindo on Jan 24, 2008 9:38 AM

    it depends on your release whether you can use ME21N and/or the bapi.
    but why throw away what you have already achieved? ME21 still works also in later releases. to find out the mandatory fields in your system, check the customzing settings in tx. OLME -> Purchase Order -> Define Screen Layout at Document Level -> click on ME21 -> Terms of delivery and payment. Here are the incoterm-settings.
    Edited by: Mylene Euridice Dorias on Jan 24, 2008 5:19 PM

  • BDC FOR ME21

    Hi ALL,
    Iam Creating BDC Program bu using ME21 for Uploading PO.
    Iam getting error at Income term2 in the Second Screen of ME21. Iam Passing this value through Excel Sheet But event then it is not picking. When i check in debugging the value of income term2 is populating.
    Let me know what are the mandotory fields for creating PO using Me21.
    Here iam also attaching the code, Please help us because it is very urgent.
    report ZPOUPLOADME21
           no standard page heading line-size 255.
    *include bdcrecx1.
    INCLUDE YMM_BDCRECX1.
    Internal Table T_BDCDATA to store BDC data
           Batchinputdata of single transaction
    DATA:   T_BDCDATA LIKE BDCDATA  OCCURS 0 WITH HEADER LINE.
    Internal Table T_BDC_MSG to store BDC messages
    DATA:   T_BDC_MSG LIKE STANDARD TABLE OF BDCMSGCOLL INITIAL
            SIZE 0 WITH HEADER LINE.
    DATA:   V_FILE LIKE RLGRAP-FILENAME ,
            V_COUNT(5) TYPE C,
            V_MESSAGE_CNT(5) TYPE C .
    DATA : BEGIN OF IT_DATA OCCURS 0,
           LIFNR LIKE EKKO-LIFNR,      " Vendor
           BSART LIKE RM06E-BSART,     " Order Type
           BEDAT(10) TYPE C,           " Date
           EKORG LIKE EKKO-EKORG,      " Purchasing Organization
           EKGRP LIKE EKKO-EKGRP,      " Purchasing Group
           WERKS LIKE RM06E-WERKS,     " Plant
           INCO2 LIKE EKKO-INCO2,      " Inco Terms
           KNTTP LIKE EKPO-KNTTP,      " A/C Assignment Category
           EMATN LIKE EKPO-EMATN,      " Material Number
           MENGE LIKE EKPO-MENGE,      " Purchase Order Quantity
           NETPR LIKE EKPO-NETPR,      " Net Price
           MWSKZ LIKE EKPO-MWSKZ,      " Tax Code
           NPLNR LIKE MSEG-NPLNR,      " Network
           VORNR LIKE PSORDER-VORNR,   " Operation
           END OF IT_DATA.
    START-OF-SELECTION.
         PERFORM OPEN_GROUP.
         PERFORM DATA_UPLOAD.
         PERFORM CALL_TRANSACTION.
         PERFORM CLOSE_GROUP.
         PERFORM WRITE_ERROR.
    *&      Form  DATA_UPLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_UPLOAD.
    *call function ws_upload to retrieve data from a flat file in the
    *presentation server into an internal table
      CALL FUNCTION 'UPLOAD'
           EXPORTING
                FILENAME                = V_FILE
                FILETYPE                = 'DAT'
           TABLES
                DATA_TAB                = IT_DATA
           EXCEPTIONS
                CONVERSION_ERROR        = 1
                INVALID_TABLE_WIDTH     = 2
                INVALID_TYPE            = 3
                NO_BATCH                = 4
                UNKNOWN_ERROR           = 5
                GUI_REFUSE_FILETRANSFER = 6
                OTHERS                  = 7.
    if ws_upload fails then display appropriate message
      IF SY-SUBRC <> 0.
       MESSAGE E000  WITH 'Data not Uploaded into internal table'.
      ENDIF.
    ENDFORM.                    " DATA_UPLOAD
    *&      Form  CALL_TRANSACTION
          text
    -->  p1        text
    <--  p2        text
    FORM CALL_TRANSACTION.
      DATA : V_IVDAT(10) TYPE C,
             V_AKTIV(10) TYPE  C,
             V_MESSAGE(404) TYPE C.
      REFRESH T_BDCDATA.
      CLEAR T_BDCDATA.
      V_COUNT = 0.
      V_MESSAGE_CNT = 0.
      LOOP AT IT_DATA .
        V_COUNT = V_COUNT + 1.
    *perform open_group.
    perform bdc_dynpro      using 'SAPMM06E' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM06E-WERKS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'EKKO-LIFNR'
                                  IT_DATA-LIFNR.
    perform bdc_field       using 'RM06E-BSART'
                                  IT_DATA-BSART.
    *perform bdc_field       using 'RM06E-BEDAT'
                                 '24.01.2008'.
    perform bdc_field       using 'RM06E-BEDAT'
                                  IT_DATA-BEDAT.
    perform bdc_field       using 'EKKO-EKORG'
                                  IT_DATA-EKORG.
    perform bdc_field       using 'EKKO-EKGRP'
                                  IT_DATA-EKGRP.
    *perform bdc_field       using 'RM06E-LPEIN'
                                 'T'.
    perform bdc_field       using 'RM06E-WERKS'
                                  IT_DATA-WERKS.
    perform bdc_dynpro      using 'SAPMM06E' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EKKO-INCO2'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'EKKO-EKGRP'
                                 IT_DATA-EKGRP1. "'SP3'.
    *perform bdc_field       using 'EKKO-PINCR'
                                 IT_DATA-PINCR. "'10'.
    *perform bdc_field       using 'EKKO-SPRAS'
                                 IT_DATA-SPRAS. "'EN'.
    *perform bdc_field       using 'EKKO-UPINC'
                                 IT_DATA-UPINC. "'1'.
    *perform bdc_field       using 'EKKO-ZTERM'
                                 IT_DATA-ZTERM.
    *perform bdc_field       using 'EKKO-WAERS'
                                 IT_DATA-WAERS. "'INR'.
    *perform bdc_field       using 'EKKO-ZBD1T'
                                 IT_DATA-ZBD1T. "'44'.
    *perform bdc_field       using 'EKKO-WKURS'
                                 IT_DATA-WKURS. "' 1.00000'.
    *perform bdc_field       using 'EKKO-INCO1'
                                 IT_DATA-INCO1.
    perform bdc_field       using 'EKKO-INCO2'
                                  IT_DATA-INCO2.
    perform bdc_dynpro      using 'SAPMM06E' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EKPO-NETPR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'EKPO-KNTTP(01)'
                                 'N'.
    perform bdc_field       using 'EKPO-KNTTP(01)'
                                  IT_DATA-KNTTP.
    perform bdc_field       using 'EKPO-EMATN(01)'
                                  IT_DATA-EMATN.
    perform bdc_field       using 'EKPO-MENGE(01)'
                                  IT_DATA-MENGE.
    perform bdc_field       using 'EKPO-NETPR(01)'
                                  IT_DATA-NETPR.
    perform bdc_dynpro      using 'SAPMM06E' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EKPO-MWSKZ'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'EKPO-KNTTP'
                                 'N'.
    *perform bdc_field       using 'EKPO-TXZ01'
                                 'Clamps & Connector'.
    *perform bdc_field       using 'EKPO-MENGE'
                                 '4'.
    *perform bdc_field       using 'EKPO-SPINF'
                                 'A'.
    *perform bdc_field       using 'EKPO-NETPR'
                                 '100.00'.
    *perform bdc_field       using 'EKPO-PEINH'
                                 '1'.
    *perform bdc_field       using 'EKPO-BPRME'
                                 'NO'.
    *perform bdc_field       using 'EKPO-BPUMN'
                                 '1'.
    *perform bdc_field       using 'EKPO-BPUMZ'
                                 '1'.
    *perform bdc_field       using 'EKPO-PRSDR'
                                 'X'.
    *perform bdc_field       using 'RM06E-EEIND'
                                 '24.01.2008'.
    *perform bdc_field       using 'RM06E-LPEIN'
                                 'D'.
    *perform bdc_field       using 'EKPO-WEPOS'
                                 'X'.
    perform bdc_field       using 'EKPO-MWSKZ'
                                  IT_DATA-MWSKZ.
    *perform bdc_field       using 'EKPO-REPOS'
                                 'X'.
    perform bdc_dynpro      using 'SAPMM06E' '0511'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EKKN-SAKTO'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    *perform bdc_field       using 'EKKN-SAKTO'
                                 '6034025'.
    *perform bdc_field       using 'DKACB-FMORE'
                                 'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'COBL-VORNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_field       using 'COBL-NPLNR'
                                  IT_DATA-NPLNR.
    perform bdc_field       using 'COBL-VORNR'
                                  IT_DATA-VORNR.
    perform bdc_dynpro      using 'SAPMM06E' '0111'.
    perform bdc_dynpro      using 'SAPMM06E' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM06E-EBELP'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    *perform bdc_field       using 'RM06E-EBELP'
                                 '10'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'ME21'.
    perform close_group.
    LOOP AT T_MESSTAB WHERE REC_NO IS INITIAL.
        AT FIRST.
          V_MESSAGE_CNT = V_MESSAGE_CNT + 1.
          T_MESSTAB-REC_NO = V_COUNT.
        ENDAT.
          MODIFY T_MESSTAB TRANSPORTING REC_NO.
        ENDLOOP.
        REFRESH T_BDCDATA.
        CLEAR T_BDCDATA.
    ENDLOOP.
      SKIP.
      WRITE : /10 'Record Number ', 30 'Error Message'.
      SKIP.
    endform.
    *&      Form  WRITE_ERROR
          text
    -->  p1        text
    <--  p2        text
    FORM WRITE_ERROR.
      LOOP AT T_MESSTAB.
        WRITE : /10 T_MESSTAB-REC_NO , 30 T_MESSTAB-MESSAGE.
      ENDLOOP.
      ULINE /10(100).
      WRITE : /10 'No of Records : ' , V_COUNT.
      WRITE : /10 'No of Erroneous Records : ' , V_MESSAGE_CNT.
      ULINE /10(100).
    ENDFORM.                    " WRITE_ERROR
    *&      Form  CHECK_BDC
          text
    -->  p1        text
    <--  p2        text
    FORM CHECK_BDC.
    DATA: L_CHECK LIKE YMMT_CHECK_BDC-YCHECK.
      SELECT SINGLE YCHECK INTO L_CHECK FROM YMMT_CHECK_BDC
                                         WHERE PROGRAMM EQ SY-REPID
                                           AND YCHECK EQ 'X'.
      IF SY-SUBRC NE 0.
        MESSAGE S000(YM) WITH 'Execution not possible'.
        STOP.
      ENDIF.
    ENDFORM.                    " CHECK_BDC
    Answers will be awarded
    Thanks
    Rahul

    It is going into the second screen but whatever the value iam passing to incoterms2 it sis not populating when i run program, but in debugging value is coming.
    Is there any possibility of user exits attached to this ME21 transaction
    please advice
    thanks
    Madhukar Reddy

Maybe you are looking for

  • How can I import movies NOT into my home folder?

    Recently got a brand new iMac with SSD and classic hard drive. The OS and the User folder resides on the SSD but the SSD is limited in size. Of course, when importing movies from camera archives or directly from a camera I don't want them to go to th

  • Install lion on old macbook pro

    I'm using a MacBookPro2,1 - purchaced 2007. 17 in. OS 10.6.8. 4 GB RAM installed. It only recognizes 3. I use this mac professionally for graphics and web development. I also have a .Mac account and I don't want to lose the use of it by not updating

  • Publish doesn't match preview

    My .fla looks great. The preview .swf looks even better. When I publish, the .swf file is all messed up...transitions don't happen, text is missing.... BUT, strangely enough, a mac Projector works fine! What's going on?

  • Oracle Weblogic Server 10.3.5's functionlaity in Windows 7 64bit

    Hi Guys, Oracle Weblogic Server 10.3.5 installs fine in Windows 7 64bit, I'm able to check its functionality in the Installed user. But If i try to launch the shortcut from any other users, I'm getting an error saying that the application can only be

  • Hp-setup not connecting to server from China

    Hello all, this is a weird problem: when I am in China I sometimes need to install new HP printers; those printers, like LaserJet M1213nf MFB of today, are fully supported by hplip on Debian, but when I try to run hp-setup it cannoct connect to serve