Uploading data for Tcode IW21

Hi,
I want to upload data for the Tcode IW21,I tried to make BDC but i was giving only 1 problem that it is not able to capture the screen for Long Text as it is used as script handling.i am able to find a BAPI but i dont know how to use it,i tried to do work through LSMW but there is no information. Pleas provide me guidelines how to solve this problem.. I am providing the link to the code which i had developed(BDC) for the tcode IW21 .
Here's the code:-
http://docs.google.com/View?id=dfxswwff_3gtn9qsdp
Edited by: ricx .s on Jun 24, 2009 6:24 AM

hi,
Thanks for your help. Can i use BAPI to upload data for IW21 and how to trace the fields of a BAPI to upload the data .
Here's the code which i searched on net bu there is no information regarding the fields tobe traced and should i include it in my code which i had provided above ?
data: i_bapi2080_nothdri type standard table of bapi2080_nothdri with header line.
data: i_bapiret2 type standard table of bapiret2 with header line.
data: i_bapi2080_nothdre type standard table of bapi2080_nothdre with header line.
data: i_bapi2080_notfulltxti type standard table of bapi2080_notfulltxti with header line.
* create header data
i_bapi2080_nothdri-refobjectkey = 'PJAREF'.
i_bapi2080_nothdri-equipment    = '10000030'.
i_bapi2080_nothdri-reportedby   = 'PJAREP'.
i_bapi2080_nothdri-short_text   = 'PJA Short Test from BAPI'.
i_bapi2080_nothdri-priority     = '1'.
* create header long text
i_bapi2080_notfulltxti-objtype    = 'QMEL'.
i_bapi2080_notfulltxti-FORMAT_COL = 'U1'.
i_bapi2080_notfulltxti-text_line  = 'Long text 1'.
append i_bapi2080_notfulltxti.
i_bapi2080_notfulltxti-objtype    = 'QMEL'.
i_bapi2080_notfulltxti-FORMAT_COL = 'U1'.
i_bapi2080_notfulltxti-text_line  = 'Long text 2'.
append i_bapi2080_notfulltxti.
call function 'BAPI_ALM_NOTIF_CREATE'
  exporting
*   EXTERNAL_NUMBER          =
    notif_type               = 'M1'
    notifheader              = i_bapi2080_nothdri
*   TASK_DETERMINATION       = ' '
*   SENDER                   =
*   ORDERID                  =
importing
    notifheader_export       = i_bapi2080_nothdre
tables
*   NOTITEM                  =
*   NOTIFCAUS                =
*   NOTIFACTV                =
*   NOTIFTASK                =
*   NOTIFPARTNR              =
    longtexts                = i_bapi2080_notfulltxti
*   KEY_RELATIONSHIPS        =
    return                   = i_bapiret2.
call function 'BAPI_ALM_NOTIF_SAVE'
  exporting
    number            = i_bapi2080_nothdre-notif_no
* IMPORTING
*   NOTIFHEADER       =
* TABLES
*   RETURN            =
call function 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
Please provide me guidelines for it.Is there any way to upload  the data for this Tcode IW21 through LSMW?
Edited by: ricx .s on Jun 24, 2009 10:20 AM

Similar Messages

  • Upload data for Tcode LT06(Transfer order creation) using BDC -very urgent

    hi experts,
          I got stucked up in writing a BDC for the Tcode LT06(Transfer order creation using wearhouse number) in MM module,
    the problem is like this, when i go to the tcode LT06 , it will ask for material doucument,mat. docu. year and wearhouse number, iam entering the inputs and then press enter, as soon as i press enter it takes me to the second screen where i will be selecting the item and then click on the button called  'Generate TO item'
    here the problem arises, as soon as i click the button iam getting a standard SAP error message(No Destination Storage Bin found in storage type 'IMP'). Due to this errror iam not able populate the batch input data on the screen, suggest me a proper solution. rewards will given if solution found useful.
    Kishore K

    Hi ,
    I have done the same in Background with BDC and TR Number for Multiple Materials ,
    Can u please explain the scenario, so then I would be able to try for solution ?
    Warm Regards.

  • Problem in uploading data for multiple company code in FB60

    Hi Experts,
    I am uploading data to tcode FB60 using bdc. If I have say 2 records in my file with same company code,
    It;s successfully posting the invoices.
    But if there are records with different company code, it's posting only the first one.
    Please suggest me some solution.
    Thanks.
    Krishan

    Hi,
    This is a njoy tcode....U have to do some settings before using the tcode....
    Go to tcode FB60 and give the company code ( if it is ur first login to the tcode then only it wil ask) .then u will get the screen to enter the document number and other stuffs....
    In that screen go to EDIT OPTIONS BUTTON on application tool bar on the right hand upper corner...
    U will get another screen in that check the check box which says NO COMPANY CODE PROPOSAL..and click on save .....
    After use this tcode for the bdc program and no error will come.
    Please let me know if u have any problems...
    Regards,
    Rohan.
    Edited by: Rohan on Feb 2, 2009 12:29 PM

  • Customized LSMW (Batch Input Recording) to upload data for Vendor

    Hello Fiends,
       can u help me on this object and how to upload in xk01.
            Customized LSMW (Batch Input Recording) to upload data for Vendor Master using Transaction code XK01
    With best wishes,
    Chandu.
    Point will be rewarded....

    Hi,
    Go through the following link, you will find your answer
    http://www.sapbrain.com
    Regards,
    Bhaskar

  • BDC Program for Uploading Data for Property Tree in cg02

    Hi,
        How to upload data for property tree ( standard Properties ) of CG02. I checked for BAPI or Function Module but most them supports for specification header and sub item. 
    Please Let me know if any function module or BAPI available for this process.  I tried with BDC Program, but it fails.
    Regards,
    Rajesh Kumar Murugesan

    Hallo Rajesh
    take a look here:
    http://help.sap.com/erp2005_ehp_06/helpdata/en/c1/eda0f591ec12408b25e7a1b369ca45/frameset.htm
    Chapter "Import and Export".
    1.)  Reads cross these further chapters:
    "Tools (EHS-BD-TLS)" => "IMport and Export" => "Import: Process" => "Specifying the Sequence of the External Data Structure "  => "External File Structure: Specification"
    Here you will learn how to prepare the data. In chapter:" Example: Transfer File for Specifications" you will find an example of an file whcih could be used to upload data in the property tree
    2.) Chapter:" Importing Specifications"  is explaining the steps whcih are need to populate the property with data using the file as prepared; read cross chapter "Specification Import Control"
    I hope this helps.
    C.B.
    Edited by: Christoph Bergemann on Feb 4, 2012 6:59 PM
    Edited by: Christoph Bergemann on Feb 4, 2012 6:59 PM

  • How to upload data for custom infotype

    Hi  Friends
    Can we use HR_INFOTYPE_OPERATIONS   FM  for custom infotype too  or is there other way or other Standard FM to upload data for custom infotype  starting with 9000..etc.
    Points will be there for sure.
    Thanks
    Meeta & Roopa

    Thanks for quick response.
    my qns is can we use Standard FM like HR_INFOTYPE_OPERATIONS  for custom infotype too ?
    in my requirment  input will come from portal form and in background  Java Wd is going to use these FM  but i have this big  doubt can we use these standard FM for  uploading data in custom infotype as well or else is there any other way.. but for sure we can't use BDC and LSMW in this requirement .
    Thanks Meeta & Roopa

  • Bapi - upload data for infotypes 0016 and 0019

    hello,
    Please let me know bapi to upload data for infotypes 0016 and 0019 as i am unable to find any bapi for this infotypes.
    Please use a more meaningful subject in future - I've edited it for you this time.
    Edited by: Matt on Nov 6, 2008 12:08 PM

    Hi Sunny,
    My suggestion is go txcode BAPI.
    After this in the left side of the window complete information on BAPIs will be available search out in Human resource you may get the BAPI, in the mean while some one may help you.
    Cheers!!
    VEnk@

  • Complete data for tcode DB02

    let me know the name of table that stores the complete data for tcode DB02

    Hello Arun,
    Please check tables DBCHK and TBATG.
    Thank you,
    Shyam

  • Problem in uploading data for the Tcode CA02

    Hi,
    I am trying to upload the data for the Tcode ca02  and i am facing a problem i.e. the uploading for the for the 18th  inspection characterstic is not able to being uploaded. I had checked the code of it  and the logic is there.
    It was previously uploading the data for it,but iit is not doing now. I had cheked the program of the screen also the fields are also present..

    would u plz send code.so i can check

  • Hi: Uploading data for CN22 tcode

    Hi,
    Iam uploading data from flat file to sap, for CN22 transaction.
    If i execute in foreground , it's working fine.
    when iam trying to execute in background it is not updating.
    i also used WAIT.
    still it is not updating.
    points will be rewarded,
    thanks in advance,
    ravi shankar reddy

    Hi Ravi,
    Iam using the same thing , but it is not working.
    pls check the code.
    REPORT zcn22networkid
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    *include bdcrecx1.
                 DATA DECLARATIONS                                      *
    TYPES : BEGIN OF ty_rectab,
              aufnr TYPE caufvd-aufnr,
              vornr TYPE afvgd-vornr,
              ltxa1 TYPE afvgd-ltxa1,
              dauno(7),   " TYPE afvgd-dauno,
              arbei(9),   " TYPE afvgd-arbei,
              arbpl TYPE afvgd-arbpl,
              mat_prkst(14),  " TYPE afvgd-mat_prkst,
              prkst(14),      "  TYPE afvgd-prkst,
              waers TYPE afvgd-waers,
              sakto TYPE afvgd-sakto,
            END OF ty_rectab.
    TYPES: BEGIN OF ty_msg,
              msgnr(24), " TYPE bdcmsgcoll-msgnr,
              msgtyp(10),  "TYPE bdcmsgcoll-msgtyp,
              message(500),
           END OF ty_msg.
    DATA : l_string(500).
    DATA : fname TYPE string.
    DATA : fname1 TYPE string.
    DATA : l_indx(6) TYPE n.
    DATA : l_indx1(6) TYPE n.
    DATA : l_tab(1) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    DATA : g_fieldname TYPE string.
    DATA : opt TYPE ctu_params.
                INTERNAL TABLES                                         *
    DATA : it_upload TYPE string OCCURS 0 WITH HEADER LINE.
    DATA : bdcdata TYPE STANDARD TABLE OF bdcdata WITH HEADER LINE.
    DATA : messtab TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
    DATA : it_rec TYPE STANDARD TABLE OF ty_rectab WITH HEADER LINE.
    DATA : it_rec1 TYPE STANDARD TABLE OF ty_rectab WITH HEADER LINE.
    DATA : it_msg TYPE STANDARD TABLE OF ty_msg WITH HEADER LINE.
    DATA : it_rec2 TYPE STANDARD TABLE OF ty_rectab WITH HEADER LINE.
    DATA : it_rec3 TYPE STANDARD TABLE OF ty_rectab WITH HEADER LINE.
         SELECTION SCREEN                                               *
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
    PARAMETERS : p_file TYPE rlgrap-filename OBLIGATORY.
    PARAMETERS : r_fgrd RADIOBUTTON GROUP g1.
    PARAMETERS : r_bgrd RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME.
    PARAMETERS : p_efile TYPE rlgrap-filename. " OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block2.
               F4 HELP FOR FILE                                         *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM f4_filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_efile.
      PERFORM get_errorfile.
    START-OF-SELECTION.
      PERFORM upload_data.
    *****FOR FOREGROUND*****
      IF r_fgrd = 'X'.
        opt-dismode = 'A'.
        opt-updmode = 'S'.
        opt-defsize = 'X'.
    ****FOR BACKGROUND******
      ELSEIF r_bgrd = 'X'.
        opt-dismode = 'N'.
        opt-updmode = 'S'.
        opt-defsize = 'X'.
      ENDIF.
    ****BDC Data************
      PERFORM bdc_data.
      IF it_msg[] IS NOT INITIAL.
        it_msg-msgnr = 'NetworkID'.
        it_msg-msgtyp   = 'Msgtyp'.
        it_msg-message  = 'Message'.
        PERFORM download_errorfile.
      ENDIF.
    *&      Form  f4_filename                                             *
    FORM f4_filename .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    ENDFORM.                    " f4_filename
    *&      Form  get_errorfile                                           *
    FORM get_errorfile .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_EFILE'
        IMPORTING
          file_name  = p_efile.
    ENDFORM.                    " get_errorfile
    *&           FORM UPLOAD_DATA                                         *
    FORM upload_data .
      fname = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = fname
          filetype                = 'ASC'
        TABLES
          data_tab                = it_upload
        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 NE 0.
        MESSAGE e001(00) WITH 'Error occurred while file reading'.
      ELSE.
        LOOP AT it_upload.
          SPLIT it_upload AT l_tab INTO it_rec-aufnr
                                        it_rec-vornr
                                        it_rec-ltxa1
                                        it_rec-dauno
                                        it_rec-arbei
                                        it_rec-arbpl
                                        it_rec-mat_prkst
                                        it_rec-prkst
                                        it_rec-waers
                                        it_rec-sakto  IN CHARACTER MODE.
          APPEND it_rec.
          CLEAR it_rec.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " upload_data
               FORM BDC DATA
    FORM bdc_data .
      it_rec1[] = it_rec[].
      SORT it_rec1 BY aufnr.
      DELETE ADJACENT DUPLICATES FROM it_rec1 COMPARING aufnr.
      LOOP AT it_rec.
        IF ( ( it_rec-dauno IS NOT INITIAL ) AND
                ( it_rec-arbei IS NOT INITIAL ) AND
                ( it_rec-arbpl IS NOT INITIAL ) AND
                ( it_rec-mat_prkst IS NOT INITIAL ) ).
          MOVE it_rec-aufnr TO it_rec2-aufnr.
          MOVE it_rec-vornr TO it_rec2-vornr.
          MOVE it_rec-ltxa1 TO it_rec2-ltxa1.
          MOVE it_rec-dauno TO it_rec2-dauno.
          MOVE it_rec-arbei TO it_rec2-arbei.
          MOVE it_rec-arbpl TO it_rec2-arbpl.
          MOVE it_rec-mat_prkst TO it_rec2-mat_prkst.
          APPEND it_rec2.
          CLEAR it_rec2.
        ELSEIF ( ( it_rec-dauno IS INITIAL ) AND
                       ( it_rec-arbei IS INITIAL ) AND
                       ( it_rec-arbpl IS INITIAL ) AND
                       ( it_rec-mat_prkst IS INITIAL ) ).
          MOVE it_rec-aufnr TO it_rec3-aufnr.
          MOVE it_rec-vornr TO it_rec3-vornr.
          MOVE it_rec-ltxa1 TO it_rec3-ltxa1.
          MOVE it_rec-prkst TO it_rec3-prkst.
          MOVE it_rec-waers TO it_rec3-waers.
          MOVE it_rec-sakto TO it_rec3-sakto.
          APPEND it_rec3.
          CLEAR it_rec3.
        ENDIF.
      ENDLOOP.
      SORT it_rec2 BY aufnr.
      SORT it_rec3 BY aufnr.
      LOOP AT it_rec1.
        CLEAR l_indx.
        CLEAR l_indx1.
        PERFORM bdc_dynpro      USING 'SAPLCOKO' '2000'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'CAUFVD-AUFNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'CAUFVD-AUFNR'
                                       it_rec1-aufnr.
        PERFORM bdc_dynpro      USING 'SAPLCOKO' '2100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'CAUFVD-KTEXT'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=LIST'.
    --table control--
        LOOP AT it_rec2 WHERE aufnr = it_rec1-aufnr.
          l_indx  = l_indx + 1.
          IF l_indx EQ 14 .
            l_indx = l_indx MOD 12.
            PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=P+'.
          ENDIF.
          PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          CONCATENATE 'AFVGD-DAUNO(' l_indx ')' INTO  g_fieldname.
          PERFORM bdc_field       USING   g_fieldname
                                         'AFVGD-DAUNO'.
          PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          CONCATENATE 'AFVGD-ARBPL(' l_indx ')' INTO  g_fieldname.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                         g_fieldname.
          CONCATENATE 'AFVGD-VORNR(' l_indx ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec2-vornr.
          CONCATENATE 'AFVGD-LTXA1(' l_indx ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec2-ltxa1.
          CONCATENATE 'AFVGD-DAUNO(' l_indx ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec2-dauno.
          CONCATENATE 'AFVGD-ARBEI(' l_indx ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec2-arbei.
          CONCATENATE 'AFVGD-ARBPL(' l_indx ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec2-arbpl.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-VORNR'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec2-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec2-ltxa1.
          PERFORM bdc_field       USING 'AFVGD-ARBPL'
                                         it_rec2-arbpl.
          PERFORM bdc_field       USING 'AFVGD-ARBEI'
                                         it_rec2-arbei.
          PERFORM bdc_field       USING 'AFVGD-DAUNO'
                                         it_rec2-dauno.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-VORNR'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec2-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec2-ltxa1.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-VORNR'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec2-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec2-ltxa1.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec2-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec2-ltxa1.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-MAT_PRKST'.
          PERFORM bdc_field       USING 'AFVGD-MAT_PRKST'
                                         it_rec2-mat_prkst.
          PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'VSNETEXT-NPLNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ARBL'.
        ENDLOOP.
        LOOP AT it_rec3 WHERE aufnr = it_rec1-aufnr.
          l_indx1  = l_indx1 + 1.
          IF l_indx1 EQ 14 .
            l_indx1 = l_indx1 MOD 12.
            PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'..
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=P+'.
          ENDIF.
          PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
          CONCATENATE 'AFVGD-SAKTO(' l_indx1 ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        'AFVGD-SAKTO'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=KOSL'.
          PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'VSNETEXT-NPLNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=KOSL'.
          PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          CONCATENATE 'AFVGD-SAKTO(' l_indx1 ')' INTO  g_fieldname.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                         g_fieldname.
          CONCATENATE 'AFVGD-VORNR(' l_indx1 ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec3-vornr.
          CONCATENATE 'AFVGD-LTXA1(' l_indx1 ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec3-ltxa1.
          CONCATENATE 'AFVGD-PRKST(' l_indx1 ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec3-prkst.
          CONCATENATE 'AFVGD-WAERS(' l_indx1')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec3-waers.
          CONCATENATE 'AFVGD-SAKTO(' l_indx1 ')' INTO  g_fieldname.
          PERFORM bdc_field       USING g_fieldname
                                        it_rec3-sakto.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec3-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec3-ltxa1.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-PRKST'.
          PERFORM bdc_field       USING 'AFVGD-PRKST'
                                         it_rec3-prkst.
          PERFORM bdc_field       USING 'AFVGD-WAERS'
                                         it_rec3-waers.
          PERFORM bdc_field       USING 'AFVGD-SAKTO'
                                         it_rec3-sakto.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-VORNR'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec3-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec3-ltxa1.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-VORNR'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec3-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec3-ltxa1.
          PERFORM bdc_dynpro      USING 'SAPLCONW' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BACK'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'AFVGD-VORNR'.
          PERFORM bdc_field       USING 'AFVGD-VORNR'
                                         it_rec3-vornr.
          PERFORM bdc_field       USING 'AFVGM-LTXA1'
                                         it_rec3-ltxa1.
          PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'VSNETEXT-NPLNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ARBL'.
        ENDLOOP.
        CLEAR it_rec.
        WAIT UP TO 10 SECONDS.
        PERFORM bdc_dynpro      USING 'SAPLCOVG' '2000'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'VSNETEXT-NPLNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BU'.
        REFRESH messtab.
        CLEAR messtab.
        CALL TRANSACTION 'CN22' USING bdcdata
                          OPTIONS FROM opt MESSAGES INTO messtab.
    ********ERROR MESSAGES TABLE************
        LOOP AT messtab WHERE ( msgtyp = 'E' ).
          CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
              id        = messtab-msgid
              lang      = '-D'
              no        = messtab-msgnr
              v1        = messtab-msgv1
              v2        = messtab-msgv2
              v3        = messtab-msgv3
              v4        = messtab-msgv4
            IMPORTING
              msg       = l_string
            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.
          ELSE.
            it_msg-msgnr    = it_rec-aufnr.
            it_msg-msgtyp   = messtab-msgtyp.
            it_msg-message  = l_string.
            APPEND it_msg.
            CLEAR it_msg.
            CLEAR l_string.
            CLEAR messtab.
          ENDIF.
        ENDLOOP.                "IT_REC
        REFRESH bdcdata.
        CLEAR bdcdata.
      ENDLOOP.                                                  "IT_REC1
    ENDFORM.                    " bdc_data
           Start new screen                                             *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                 *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  download_errorfile                                      *
    FORM download_errorfile .
      fname1 = p_efile.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = fname1
          filetype                = 'ASC'
          write_field_separator   = 'X'
        TABLES
          data_tab                = it_msg[]
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      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.                    " download_errorfile

  • BDC / Bapi to upload data for MI04

    Hi,
    Which is the best way to uplaod data to MI04 tcode. When i am trying with the BDC iin All screen mode it is throughing error after entering the quantity. Error is : Background processing not possible for material with serial number reqmt.
    Thanks

    use ''BAPI_MATPHYSINV_COUNT' bapi...
    u have to fill all the structures or ITAB which are mandatory. Then pass them to this BAPI. after that use BAPI_TRANSACTION_COMMIT to update the database
    and how to create .txt file to upload data to this transaction.
    the text file should contain all the fields which are necessary to pass to bapai structures /ITABs
    better , u can run the corresponding trn.. to know all mandt fields
    U can use GUI_upload to upload the flat file.
    Reward if useful

  • Creation and Change Date for Tcode and Function Groups

    Hello All,
    I need to display the Creation and Change Dates for Custom Tcodes and Function Groups in a Report. Can anyone please let me know the logic of retrieving it.
    regards,
    Mahesh

    Hi,
    TADIR and TRDIR is the tables where you can find all these data
    Regards
    Sudheer

  • Best practice to upload data for Appraisals: BDC, LSMW or functional module

    Hi,
    I have heard that BDC and LSMW do not work for data upload in appraisals. Is it true?
    Can we use ECATT or SECATT to upload data in appraisals?
    I somewhere got the information that functional modules
    HRHAP_DOCUMENT_PREPARE
    HRHAP_DOC_UPDATE_BODY_AND_SAVE
    HRHAP_DOCUMENT_CREATE
    are used to upload the data for appraisals?
    Many of my earlier clients found it very hectic to create appraisal templates every year (PHAP_CREATE). They needed something automated for this.  I managed to suggest them manual upload or SECATT, but I am not sure if BDC/LSMW work for this.
    Can somebody throw some light on this?
    Best regards,
    Veera Sasidhar Jangam

    Hi,
    You need to write a code for same and use function modules available as those does direct updates to database.
    If client is not bothered about look and feel during dataload or do not care about display infotypes during data updates then use above method otherwise BDC needs to be written with screen control programming in it.
    Thanks,
    Ameet

  • While uploading data for employee as a vendor (with their loans and advance

    Hi,
    We are going for one company live. We are not taking HR module as of now.
    We are creating employee as a vendor for all employees with outstanding loans and advances.
    Now while uploading initial data for these employee (created as vendor), business wants personal loan outstanding balances employee as a vendor wise.
    Generally in case of normal vendor, we treat like
    Vendor A/C Dr
    to takeover creditors a/C  Cr
    while going for initial upload.
    In above case what should we do if we want outstanding balances (personal loan) while initial balance upload?
    Thanks,
    Taral Patel

    Hi,
    You can create a separate employee vendor for Advances paid to them with an assignment to a separate recon account titled as Advance to Employees. Later, you can upload the entries by Debiting the Employee Advance Vendor account and crediting Vendor Upload Account.
    Advances paid to employees (recon account) will represent in the TB as a separate line item forming an MIS.
    Regards
    Hari

  • How to upload data for me01 using lsmw recording method

    *dear expert please tell me the complete procedure for how to upload data in me01 transaction using lsmw recording method.
    Moderator Message: Duplicate post locked.
    Edited by: Vinod Kumar on May 8, 2011 7:56 PM

    Hi,
    To be honest I don't understand your question. When You execute LSMW and create project, then all steps are shown in a very clear way with good description. With which one you have problems?
    Best regards
    Marcin Cholewczuk

Maybe you are looking for

  • Why does my email template appear differently in various email programs?

    I have created a CSS-style based email template using Dreamweaver CS6.  The template looks great within Dreamweaver, on Internet Explorer and in Outlook 2003.  However, when viewed in Outlook 2010, Hotmail and Gmail, the template is distorted.  If I

  • 0PUR_C04

    Hi!! Im using the cube 0PUR_C04 in a standard mode; I activated the infosources and update rules and when I saw the content of infocube some key figures dont have information, I revised the update rules and found this key figures that dont have actua

  • Subcontrating Purchase order with Validity Period.

    Hii, Our user here using validity period to restrict GR creation or invoice verification process against the order if posting date is not within validity period. There is certain case whereby GR have been received in full quantity examle; PO Item for

  • In my InteractiveForm WebDynpro appl got Deployment error

    Hi all, I got this deployment error----<b>Deployment exception : Cannot determine sdm host (is empty). Please configure your engine/sdm correctly !</b>Does it meant to say that SDM has to be restarted? Help me, Thanks&Regards, Gnesh

  • MySql connection pooling in Tomcat 4.1

    Hi, Could somebody help me before I go insane ? I have installed Tomcat 4.1 and MySql and is now trying to follow the example at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html to set up a pooled connection to the