Take some data while doing a CALL TRANSACTION

Hello,
I am trying to make a call transaction to HU02 (standard). The problem is that when I do this, I generate a handling unit.
My call transaction is next:
    CALL TRANSACTION 'HU02' USING I_BDCTAB
                            MODE 'A' UPDATE 'S'
                            MESSAGES INTO IMESSAGES.
The problem is that in the messages it doesn't say the number of my new handling unit and I need to know that name.
I would like to know how can I obtain that number. Can I save the number while I am doing the call transaction??
I know that I can use, export and import sentences, but this is an standar program and I can't make any change on it.
How can I resolve my problem??
Thank you very much in advance.
Best regards.

I have already resolved the problem.
Thanks

Similar Messages

  • HT1414 I lost all my data while doing the latest software upgrade, how do I get it back if I dont have a backup on iTunes?

    I lost all my data while doing the latest software upgrade, how do I get it back if I dont have a backup on iTunes?

    If you don't have a backup, then all your pics/text/notes are gone.
    You can sync back music and app.  If you were syncing your contacts with a program in itunes, then you'll get that back.
    Not sure why you didn't do a backup, especially prior to doing an upgrade.

  • How to Hide/show the columns data while doing Drill down or drill up

    Hi ,
    How to Hide/show the columns data while doing Drill down or drill up in webi report .
    Does it possible BO 3.1 version ?
    Please suggest me on this.
    Thanks & Regards
    Venkat

    While that is not there yet, you can make use of the show when empty yes/no in combination with alerters.
    So I have an alerter applied to every cell of the table.
    When a condition is true (say I drilled down) I just put = "" in every cell, emptying the table,
    because its now empty and doesn't need to show, it wont.
    For the detail table I use the opposite, so when you drilled down it becomes visible...
    Hope this helps all that do not have 40 yet
    Good luck,
    Marianne

  • Error while updating data using session and call transaction method

    Hi all,
        i have to update data using MM01 transaction from flat file to database.i have used both session method and call transaction method to do that.in both the methods data has been transferred from internal tables to screens but while updating the data that is by clicking the ok-code at the end of the transaction iam getting a dialogue box stating
       SAP EXPRESS DOCUMENT "UPDATE WAS TERMINATED" RECEIVED FROM AUTHOR "SAP".
      please tell whether the problem lies and solution for that.
                                       thanks and regards.

    hi,
    check your recording.check whether u saved your material no in recording or not.
    once again record the transacton mm01.
           MATNR LIKE RMMG1-MATNR,
           MBRSH LIKE RMMG1-MBRSH,
           MTART LIKE RMMG1-MTART,
           MAKTX LIKE MAKT-MAKTX,
           MEINS LIKE MARA-MEINS,
           MATKL LIKE MARA-MATKL,
           BISMT LIKE MARA-BISMT,
           EXTWG LIKE MARA-EXTWG,
    these are the fields which u have to take in internal table.
    this is the record which i took in my flatfile.use filetype as asc and hasfieldseperator as 'X'.
    SUDHU-6     R     ROH     MATSUDHU     "     001     7890     AA
    i did the same.but i didn't get any error.

  • Type of error in the log file while using using call transaction mode u2018Eu2019

    Hi Gurus,
    Please Answer for this qusetion urgently
    what type of error exactly  you will be seeing in the log file while using call transaction mode u2018Eu2019?
    Thanks/
    Radha.

    Hi,
    Can you be clear.
    In call transaction , no error logs  are created, you have to handle the errors explicitly using the structure BDCMSGCOLL.
    Whenever you use E mode then if the transaction encounters any of the errors i.e. data type mismatching or invalid values etc, it will stop at that screen.
    You can handle the errors in call transaction in the following method.
    create a table using the structure BDCMSGCOLL.
    then
    loop at ......
          CALL TRANSACTION 'XK01' USING I_BDCDATA MODE 'N' UPDATE 'S' MESSAGES INTO I_MESGTAB.
    endloop.
      SORT I_MESGTAB BY MSGID MSGV1 ASCENDING.
      DELETE ADJACENT DUPLICATES FROM I_MESGTAB.
      LOOP AT I_MESGTAB.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID   = I_MESGTAB-MSGID
            LANG = I_MESGTAB-MSGSPRA
            NO   = I_MESGTAB-MSGNR
            V1   = I_MESGTAB-MSGV1
            V2   = I_MESGTAB-MSGV2
            V3   = I_MESGTAB-MSGV3
            V4   = I_MESGTAB-MSGV4
          IMPORTING
            MSG  = MESG1.
        IF I_MESGTAB-MSGTYP = 'S' .
          WA_SUCCMESG-MESG = MESG1.
          APPEND WA_SUCCMESG TO I_SUCCMESG.
    else     IF I_MESGTAB-MSGTYP = 'E' .
          WA_ERRMESG-MESG = MESG1.
          APPEND WA_ERRMESG TO I_ERRMESG.
        ENDIF.
      ENDLOOP.
    Hope this is clear.
    Thanks and Regards.

  • Error While doing F-02 Transaction

    Hi,
    I am posting F-02 transaction with
    Debit - 451000 (Product Discounts)
    Credit-220035 (Accrued -Payble)
    451000 is a revenue cost element with cost element category 12
    Now i am trying to post the above entry with cost 9740.But the system is giving the below error.kindly help me in fix this issue.
    Enter a true account assignment object with revenues
        Message no. KI166
    Diagnosis
        You made an account assignment for 451000, a revenue element, in
        controlling area 9000 to a cost center or profit center.
    Thanks
    Supriya

    Hi
    If it is revenue element you can not use Cost center (if cost center blocked for revenu postinngs in KO02), so you need to enter profit center.
    Padma

  • ODI: Way to select Distinct data while doing Join of tables at Source

    HI,
    Our requirement is to do a join on multiple tables selecting distinct data from those table at source.
    But we are not able to see the Distinct Box in flow tab.
    Any thoughts to resolve our problem
    Pratik

    You can not put DISTINCT clause selectively .
    If you choose to opt for DISTINCT then Oracle will apply the distinct to all columns present in the select list .
    So at your IKM level just click the distinct check box .. run your interface and find out the query generated .
    See if your requirement is getting fullfilled or not .
    Thank,
    Sutirtha

  • How do I take some data files off computer and transfer copies to my iPad?

    I am a writer and would like to tranfer a file of unfinished short stories to my iPad so I can work on them while on Christmas vacation. How do I do that?

    You first need an app on the iPad that supports whatever format your files are in - the iPad doesn't have a file system like a 'normal' computer, everything has to be associated with an app. If your files are in Word format then apps such as Apple's Pages and third-party apps such as Documents To Go and QuickOffice HD are three options.
    As to how you then get the files onto the iPad will depend upon which app you chose, as different apps can have different ways of copying their content to/from a computer e.g. via the file sharing section at the bottom of the device's apps tab when connected to iTunes, via wifi, email, dropbox etc.

  • Diff Amt and Qty Zero while doing POS sales transactions.

    Hi ,
    This is specific to IS retail.
    Scenario : The POS system has done a sale for Rs 25  and return of the same article at Rs 21.
    When the aggregated info is sent from the POS system ( through WPUUMS IDoc), it says Quantity is Zero  and Amount is Rs 4.
    The Idoc is going in a hang state ( Yellow Color). The reason is i think, since thq quantity is zero, it is not able to post it.
    Pls let me know how to handle it.
    Thanks
    Prasad
    Edited by: jiddu prasad on Dec 27, 2008 12:16 PM

    Dear Prasad,
    You can issue Credit Note for Sales Returns.
    Sales Return procedure:
    (a) Sales Return should come as a separate line item.
    (b) Sales Returns will be denoted by negative sales.
    (c) Sales qty in POS Inbound will be negative.     
    (d) Store will be credited for the amount of returns.
    (e) In case of credit note issue in lieu of returns will be uploaded as part of payment information with negative amount.
    Tracking of Credit Note should be done at POS level.
    Review SAP Note 406319
    Bye,
    Muralidhara

  • While uploading data into the r/3 using call transaction or session method

    hi experts
    while uploading data into the r/3 using call transaction or session method error occured in the middle of the processing then how these methods behaves it transfers next records or not?

    hai
    Session method: The records are not added to the database until the session is processed. sy-subrc is not returned. Error logs are created for error records. Updation in database table is always Synchronous.
    Call Transaction method: The records are immediately added to the database table. sy-subrc is returned to 0 if successful. Error logs are not created and hence the errors need to be handled explicitly. Updation in database table is either Synchronous or Asynchronous.
    While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system.
    the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).
    so the session method should not return any value.
    In call transaction method data is directly pass to the SAP system.
    So its compulsory return the value.
    Because of the call transaction is the function.
    A function should return the value mandatory
    In session method errors stroed in SYSTEM GENRATED ERROR LOG.
    IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
    FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
    THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
    THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
    AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING.

  • Error While Uploading Material Master Through Bdc Call Transaction

    Hi Sap Gurus,
    I am doing Bdc call Transaction for Material Master Uploading.
    But After Entering data for 4-5 screen i got a error_
    Field Mara-iprkz doesn,t exit in the screen saplmgmm 4000
    Field Mara-prctr doesn,t exit in the screen saplmgmm 4000
    Field Mbew-stprs doesn,t exit in the screen saplmgmm 4000
    Field Marc-mtvfe doesn,t exit in the screen saplmgmm 4000
    Enter Valuation class.
    This is my Programme....................................
    <removed by moderator>
    Thanks in advance.
    Arindam
    Moderator message: please post only relevant code parts, your post must be less than 5000 characters to preserve formatting.
    Edited by: Thomas Zloch on Apr 16, 2011 9:29 PM

    Sorry for my obvious answer, but you should ask a more precise question.
    Your errors are that you try to enter fields but they don't exist, so it sounds logic.
    And the error "Enter Valuation class." means that the field is mandatory. So you must enter it.
    Re-record the transaction using SHDB (eventually play with the http://wiki.sdn.sap.com/wiki/display/ABAP/Recordduringplay), run it in A display mode, and correct your program.
    Sandra
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MVKE-SKTOF'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MARC-PRCTR'
                                  wa_mara-prctr."'MUMBAI'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MARA-IPRKZ'
                                  'D'.

  • How to Get Availability date? while doing MIGO

    Hi Guys ,
    Can any body tell me how can i get Availability Date while doing MIro ?
    1.I have to get Availability date
    2. and that Availability date is Production date + 8 days ?
    how can i implement this one ? is there any relevent user exits is there ?
    please give me some input?
    regards
    Prabhu

    Hi Guys ,
    Can any body tell me how can i get Availability Date while doing MIGO ?
    1.I have to get Availability date
    2. and that Availability date is Production date + 8 days ?
    how can i implement this one ? is there any relevent user exits ?
    please give me some input?
    regards
    Prabhu

  • Date format for call transaction

    Hi,
    What is the best solution for passing a date field to a call transaction in the date format that the user has in his settings?.
    Rgds

    The best solution is to define a character field of length 10.  Then WRITE the date to the BDC_DATE and then use this variable when passing to BDC.
    data: bdc_date(10) type c.
    write sy-datum to bdc_Date.
    Regards,
    Rich Heilman

  • BDC using call transaction

    Hi ,
    This is vijay...
    can anyone help me plz
    Hi,
    Iam uploading data using call transaction.Tcode is ff67.In this TCode we have the begining balance(ssald) and ending balance(esald).The new record we are uploading will take the begining balance as the previous record ending balance, if we give the begining balance wrong then the record does not saved it will show error(the begining balance does not match with the prior ending balance).
    while uploading the data using MODE A iam able to get the desired output but by using the MODE N iam not able to get the desired output i,e if there is any error in the begining balance also the record is being saved iam not getting the error message.
    Iam attaching the code below..please help me
    report Z_BRS_BDC no standard page heading line-size 255.
            INTERNAL TABLES DECLARATIONS
    DATA : BEGIN OF bdcdata OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA : END OF bdcdata.
    DATA:  LV_OUT TYPE STRING.
    DATA : iopt LIKE ctu_params.
    DATA : wa_rec_err   TYPE i.
    DATA : wa_rec_wri TYPE i.
    DATA : wa_tot_rec TYPE i.
    DATA : amt(16) type c.
    DATA : BEGIN OF gu_upload OCCURS 0,
           hbkid LIKE febmka-hbkid,
           hktid LIKE febmka-hktid,
           aznum LIKE febmka-aznum,
           azdat LIKE febmka-azdat,
           ssald LIKE amt,
           esald LIKE amt,
           budtm LIKE febmka-budtm,
           mnam1 LIKE febmka-mnam1,
           jname LIKE febmka-jname,
           vgman LIKE febmka-vgman,
           valut LIKE febep-valut,
           kwbtr(13) TYPE c,
           chect_kf LIKE febmkk-chect_kf,
          END OF gu_upload.
    DATA:GU_DOWNLOAD LIKE GU_UPLOAD OCCURS 0 WITH HEADER LINE.
    kishi*********************************
    DATA: BEGIN OF itab OCCURS 0,
         vgman LIKE febmka-vgman,
         valut LIKE febep-valut,
         kwbtr(13) TYPE c,
         chect_kf LIKE febmkk-chect_kf,
         END OF itab.
    kishi)(_()00-8-09
    DATA: BEGIN OF  messtab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    DATA: BEGIN OF messtab1 OCCURS 0.
            INCLUDE STRUCTURE messtab.
    DATA: END OF messtab1.
    DATA : BEGIN OF int_count OCCURS 0.
            INCLUDE STRUCTURE alsmex_tabline.
    DATA : END OF int_count.
    DATA: c_tcode      LIKE sy-tcode              VALUE 'FF67',
          c_upd        LIKE ctu_params-updmode    VALUE 'S',
          c_def_size   LIKE ctu_params-defsize    VALUE 'X'.
    *VALUES FOR STARTING COLUMNS AND ROWS IN THE EXCEL SHEET
    DATA : c_begcol     TYPE i                     VALUE '1',
          c_begrow     TYPE i                     VALUE '1',
    *DATA IS ENDED AT THE 13TH COLUMN IN THE EXCELSHEET
          c_endcol     TYPE i                     VALUE '13',
    *LAST ROW IN THE EXCEL SHEET
          c_endrow     TYPE i                     VALUE '65536',
          c_path(3)    TYPE c                     VALUE 'C:\'.
    *Field Symbols
    FIELD-SYMBOLS: <fs>.
         SELECTION SCREEN PARAMETERS
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_file LIKE rlgrap-filename DEFAULT
    'C:\ ',
    *This is the path for downloading file
    P_FNAME2 LIKE RLGRAP-FILENAME ,
    c_mode LIKE ctu_params-dismode  DEFAULT 'N'.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *F4 HELP FOR FILE SELECTION
      PERFORM validate_input_file.
    START-OF-SELECTION.
      CLEAR gu_upload.
      REFRESH gu_upload.
         UPLOAD THE DATA FROM FLAT FILE TO INTERNAL TABLE
      PERFORM file_upload.
      iopt-dismode = c_mode.
      iopt-updmode = c_upd.
      iopt-defsize = c_def_size.
         POPULATE THE DATA THROUGHSCREENS
      PERFORM bdc_upload.
    END-OF-SELECTION.
    *DISPLY THE ERROR RECORDS
    PERFORM DISPLAY-DATA.
          FORM file_upload                                              *
    FORM file_upload.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = p_file
                i_begin_col             = c_begcol
                i_begin_row             = c_begrow
                i_end_col               = c_endcol
                i_end_row               = c_endrow
           TABLES
                intern                  = int_count
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      LOOP AT int_count.
        ASSIGN COMPONENT int_count-col OF STRUCTURE gu_upload TO <fs>.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        <fs> = int_count-value.
        AT END OF row.
          APPEND gu_upload.
          CLEAR gu_upload.
        ENDAT.
      ENDLOOP.
    *kishhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
      LOOP AT gu_upload.
        itab-vgman = gu_upload-vgman.
        itab-valut =  gu_upload-valut.
        itab-kwbtr = gu_upload-kwbtr.
        itab-chect_kf = gu_upload-chect_kf.
        APPEND itab.
      ENDLOOP.
    *kishiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
    ENDFORM.                    "file_upload
    *&      Form  BDC_UPLOAD
    FORM bdc_upload.
      LOOP AT gu_upload.
        CLEAR bdcdata.
        REFRESH bdcdata.
    *&      POPULATE THE DATA FOR FIRST SCREEN
    perform bdc_dynpro      using 'SAPMF40K' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'FEBMKA-JNAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'FEBMKA-BUKRS'
                                  'IN14'.
    perform bdc_field       using 'FEBMKA-HBKID'
                                  gu_upload-hbkid.
    perform bdc_field       using 'FEBMKA-HKTID'
                                  gu_upload-hktid.
    perform bdc_field       using 'FEBMKA-AZNUM'
                                  gu_upload-aznum.
    perform bdc_field       using 'FEBMKA-AZDAT'
                                  gu_upload-azdat.
    perform bdc_field       using 'FEBMKA-SSALD'
                                  gu_upload-ssald.
    perform bdc_field       using 'FEBMKA-ESALD'
                                  gu_upload-esald.
    perform bdc_field       using 'FEBMKA-BUDTM'
                                  gu_upload-budtm.
    perform bdc_field       using 'FEBMKA-MNAM1'
                                  gu_upload-mnam1.
    perform bdc_field       using 'FEBMKA-JNAME'
                                  gu_upload-jname.
    *&      POPULATE THE DATA FOR SECOND SCREEN
        DATA : fnam(20) TYPE c,
              idx      TYPE c.
        MOVE 1 TO idx.
        LOOP AT itab.
          PERFORM bdc_dynpro      USING 'SAPMF40K' '8000'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'FEBMKK-CHECT_KF(03)'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          CONCATENATE 'FEBMKA-VGMAN(' idx ')' INTO fnam.
          PERFORM bdc_field       USING fnam
                                        itab-vgman.
          CONCATENATE 'FEBEP-VALUT(' idx ')' INTO fnam.
          PERFORM bdc_field       USING fnam itab-valut.
          CONCATENATE 'FEBMKA-KWBTR(' idx ')' INTO fnam.
          PERFORM bdc_field       USING fnam itab-kwbtr.
          CONCATENATE 'FEBMKK-CHECT_KF(' idx ')' INTO fnam.
          PERFORM bdc_field USING fnam itab-chect_kf.
          idx = idx + 1.
        ENDLOOP.
    *perform bdc_dynpro      using 'SAPMF40K' '8000'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'FEBMKK-CHECT_KF(01)'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    *perform bdc_field       using 'FEBMKA-VGMAN(01)'
                                 'z001'.
    *perform bdc_field       using 'FEBEP-VALUT(01)'
                                 '2007/04/26'.
    *perform bdc_field       using 'FEBMKA-KWBTR(01)'
                                 '          5000-'.
    *perform bdc_field       using 'FEBMKK-CHECT_KF(01)'
                                 '1122'.
    perform bdc_dynpro      using 'SAPMF40K' '8000'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'FEBMKK-CHECT_KF(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    *&      POPULATE THE DATA FOR FOURTH SCREEN
    perform bdc_dynpro      using 'SAPMF40K' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'FEBMKA-BUKRS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BUCH'.
    perform bdc_field       using 'FEBMKA-BUKRS'
                                  'IN14'.
    perform bdc_field       using 'FEBMKA-HBKID'
                                  gu_upload-hbkid.
    perform bdc_field       using 'FEBMKA-HKTID'
                                  gu_upload-hktid.
    perform bdc_field       using 'FEBMKA-AZNUM'
                                  gu_upload-aznum.
    perform bdc_field       using 'FEBMKA-AZDAT'
                                  gu_upload-azdat.
    perform bdc_field       using 'FEBMKA-SSALD'
                                  gu_upload-ssald.
    perform bdc_field       using 'FEBMKA-ESALD'
                                  gu_upload-esald.
    perform bdc_field       using 'FEBMKA-BUDTM'
                                  gu_upload-budtm.
    perform bdc_field       using 'FEBMKA-MNAM1'
                                  gu_upload-mnam1.
    perform bdc_field       using 'FEBMKA-JNAME'
                                  gu_upload-jname.
    *perform bdc_dynpro      using 'SAPMF40K' '0101'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/EENDE'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'FEBMKA-BUKRS'.
    perform bdc_dynpro      using 'SAPMF40K' '0101'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EABBR'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'FEBMKA-BUKRS'.
    *&      USING THE CALL TRANSACTION
        PERFORM call_transaction.
       CLEAR BDCDATA.                      "<--- Add here
       REFRESH BDCDATA.                 "<--- Add here
      ENDLOOP.
    ENDFORM.                    " BDC_UPLOAD
    *&      Form  VALIDATE_INPUT_FILE
    FORM validate_input_file.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_path         = ' c:\ '
                mask             = ',.txt,.*.'
                mode             = 'O'
                title            = 'Upload '
           IMPORTING
                filename         = p_file
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
    IF sy-subrc <> 0.
    IF sy-subrc <> 0 AND sy-subrc <> 3.
       MESSAGE e100(zm) WITH text-007.
    ENDIF.
    ENDFORM.                    " VALIDATE_INPUT_FILE
           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  CALL_TRANSACTION
    FORM call_transaction.
      DATA: l_index LIKE sy-tabix.
      CALL TRANSACTION  c_tcode USING bdcdata
                                MODE c_mode
                                MESSAGES INTO messtab.
    *POPULATE THE ERROR RECORDS INTO INTERNAL TABLE
      IF SY-SUBRC NE 0.
        GU_DOWNLOAD-HBKID = GU_UPLOAD-HBKID.
       GU_DOWNLOAD-HBKID = GU_UPLOAD-HBKID.
        GU_DOWNLOAD-HKTID = GU_UPLOAD-HKTID.
        GU_DOWNLOAD-AZNUM = GU_UPLOAD-AZNUM.
        GU_DOWNLOAD-AZDAT = GU_UPLOAD-AZDAT.
        GU_DOWNLOAD-ESALD = GU_UPLOAD-ESALD.
        GU_DOWNLOAD-SSALD = GU_UPLOAD-SSALD.
        GU_DOWNLOAD-BUDTM = GU_UPLOAD-BUDTM.
        GU_DOWNLOAD-MNAM1 = GU_UPLOAD-MNAM1.
        GU_DOWNLOAD-JNAME = GU_UPLOAD-JNAME.
        GU_DOWNLOAD-VGMAN = GU_UPLOAD-VGMAN.
        GU_DOWNLOAD-VALUT = GU_UPLOAD-VALUT.
        GU_DOWNLOAD-KWBTR = GU_UPLOAD-KWBTR.
        GU_DOWNLOAD-CHECT_KF = GU_UPLOAD-CHECT_KF.
        APPEND GU_DOWNLOAD.
    *DISPLAY THE PROGRESS OF PROCESS
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
       PERCENTAGE       = 0
       TEXT             = 'Downloading is in process'.
    *DOWNLOADING THE ERROR RECORD
        LV_OUT = P_FNAME2.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            FILENAME               =  LV_OUT
            WRITE_FIELD_SEPARATOR  =      'X'
          TABLES
            DATA_TAB                =  GU_DOWNLOAD.
    ENDIF.
      IF NOT messtab[] IS INITIAL.
        PERFORM format_message.
      ENDIF.
    ENDFORM.                    " CALL_TRANSACTION
    *&      Form  DISPLAY-DATA
    FORM display-data.
      SKIP.
      WRITE: 'SY-SUBRC' , sy-subrc.
    ENDFORM.                    " DISPLAY-DATA
          FORM FORMAT_MESSAGE                                           *
    FORM format_message.
      DATA: l_msg(100),
       l_index LIKE sy-tabix.
      LOOP AT messtab.
        READ TABLE gu_upload INDEX l_index.
        CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
                  id        = messtab-msgid
                  lang      = sy-langu
                  no        = messtab-msgnr
                  v1        = messtab-msgv1
                  v2        = messtab-msgv2
                  v3        = messtab-msgv3
                  v4        = messtab-msgv4
             IMPORTING
                  msg       = l_msg
             EXCEPTIONS
                  not_found = 1
                  OTHERS    = 2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
       WRITE:/ l_msg.
      ENDLOOP.
      WRITE:/ l_msg.
    ENDFORM.
    Message was edited by:
            vijayd duvvada

    Hi,
      First , keep the mode "E" and check the debugger , you can exactly see where the error is and let me know, what error and where it is stoping.
    By your coding, i suppose to think that, its proble in the amount (currency). When ever you are try to pass the value, and value is not there in upload file or data is mismatch, the call transaction will fail in mode 'A' and succesful in mode 'N'.
    In that situation use this before the currecny field.
    IF NOT FEBMKA-SSALD IS INTIAL.
       perform bdc_field using 'FEBMKA-ESALD'
                                      gu_upload-esald.
    ENDIF.
    tHANKS
    Manju

  • Main diff between call transaction and session method

    hi frnds.
    my friend went for an interview they asked her whts the diff between call tran adn session?
    she told more thn one transaction we can call for an session she told itseems. but he told tht by cal tran also u cn call more thn one tran it seems... so please canu help me out regarding this question? how we hve to tell in interview?
    in advance thanks....

    Hi
    Batch Input and CALL TRANSACTION are both data transfer methods. Batch Input usually are used to transfer large amount of data. For example you are implementing a new SAP project, and of course you will need some data transfer from legacy system to SAP system. If there is no standard batch input program, direct input program, you would need to write your own data transfer program and it is going to be batch input program. CALL TRANSACTION methods is real-time method, whenever you run the program CALL TRANSACTION can be triggered. CALL TRANSACTION is used especially for integration actions between two SAP systems or between different modules. Users sometimes wish to do something like that click a button or an item then SAP would inserts or changes data automatically. Here CALL TRANSACTION should be considered. You use CALL TRANSACTION and you do everything automatically, collect necessary data, call transaction and so do database update. If any error occurs, show the user them.
    Batch Input
    With the Batch Input method, an ABAP program reads the external data that is to be entered in the R/3 System and stores the data in a “batch input session”. The session records the actions that are required to transfer data into the system using normal SAP transactions.
    When the program has generated the session, you can run the session to execute the SAP transactions in it. You can explicitly start and monitor a session with the batch input management function (by choosing System - Services - Batch Input), or have the session run in the background processing session.
    It offers management of sessions, support for playing back and correcting sessions that contain errors, and detailed logging. Your program prepares the data and stores it in a batch input session. A session is a collection of transaction data for one or more transactions. Batch input sessions are maintained by the system in the batch input queue. You can process batch input sessions in the background processing system.
    Your program must open a session in the queue before transferring data to it, and must close it again afterwards. All of these operations are performed by making function modules calls from the ABAP program.
    The most important aspects of the session interface are:
    Asynchronous processing
    Transfer data for multiple transactions
    Synchronous database update. During processing, no transaction is started until the previous transaction has been written to the database.
    A batch input processing log is generated for each session
    Sessions cannot be generated in parallel. The batch input program must not open a session until it has closed the preceding session.
    CALL TRANSACTION
    In the second method, your program uses the ABAP statement CALL TRANSACTION USING to run an SAP transaction. External data doesn’t have to be deposited in a session for later processing. Instead, the entire batch input process takes place inline in your program. With CALL TRANSACTION USING, the system process the data more quickly than with batch input sessions. Unlike batch input sessions, CALL TRANSACTION USING does not automatically support interactive correction or logging functions.
    Your program prepares the data and then calls the corresponding transaction that is then processed immediately.
    The most important features of CALL TRANSACTION USING are:
    Synchronous processing
    Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called
    You can update the database both synchronously and asynchronously. The program specifies the update type.
    Separate LUW (Logical Units of Work) for the transaction. The system executes a database commit immediately before and after the CALL TRANSACTION USING statement.
    No batch input processing log

Maybe you are looking for