Call transaction (MF60) with variant

hi
in user will save  some variant of the TCODE : MF60, and will put they in job what use SM36 to set job schedule.but the resule message can't be know in BG work.
i want to write a report to run the Transaction (MF60) and to save message with abap application log.
first:
how to find the Transaction contain variant?
second:
if i use abap code: CALL transaction in report,how to set variant to transaction.
three:
i know the command:SUBMIT will call from VARIANT:
but MF60's report is RMPU_SEL_SCREEN,but this report have two transaction: MF60,MF63.
how to set Transaction to this RMPU_SEL_SCREEN.
four:
i know the SM36 will set variant to TCODE,how to open job in ABAP.
thank you very much!

in my company,users will create themselves varaints about MF60.
and they put variants in job schedule (use SM36 ) in bg work at night.
so when these job is over,the last message don't show for they.
they doubt about it and they will spent lot time to get what oneself document for last genearate.
i want to write a report and put this report in job schedule  to run MF60.
and get last message for call transaction in abap appliacation log.
next day users just use TCODE SLG1 to view last night run MF60 result.
so first i must get all MF60 of variant what will be run and get message
when this  transancations is over.save message in database!
thank you very much for  your help!

Similar Messages

  • Plz tell me BDC  CALL TRANSACTION steps with simple example

    hi,
    plz tell me the steps
    BDC  CALL TRANSACTION steps with simple example

    Hi,
    BATCH DATA COMMUNICATION
    About Data Transfer In R/3 System
    When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data situation. Normally, a SAP R/3 project comes into replace or complement existing application.
    In the process of replacing current applications and transferring application data, two situations might occur:
    ? The first is when application data to be replaced is transferred at once, and only once.
    ? The second situation is to transfer data periodically from external systems to SAP and vice versa.
    ? There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process will be repetitive.
    The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called ?batch input? or ?batch data communication?.
    1. SESSION METHOD
    2. CALL TRANSACTION
    3. DIRECT INPUT
    Advantages offered by BATCH INPUT method:
    1. Can process large data volumes in batch.
    2. Can be planned and submitted in the background.
    3. No manual interaction is required when data is transferred.
    4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.
    To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP system. This program, known as a ?data transfer? program must map the data from the external system into the data structure required by the SAP batch input program.
    The batch input program must build all of the input to execute the SAP transaction.
    Two main steps are required:
    ? To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
    ? To pass the table to SAP for processing.
    Prerequisite for Data Transfer Program
    Writing a Data Transfer Program involves following prerequisites:
    Analyzing data from local file
    Analyzing transaction
    Analyzing transaction involves following steps:
    ? The transaction code, if you do not already know it.
    ? Which fields require input i.e., mandatory.
    ? Which fields can you allow to default to standard values.
    ? The names, types, and lengths of the fields that are used by a transaction.
    ? Screen number and Name of module pool program behind a particular transaction.
    To analyze a transaction::
    ? Start the transaction by menu or by entering the transaction code in the command box.
    (You can determine the transaction name by choosing System ? Status.)
    ? Step through the transaction, entering the data will be required for processing your batch input data.
    ? On each screen, note the program name and screen (dynpro) number.
    (dynpro = dyn + pro. Dyn = screen, pro = number)
    ? Display these by choosing System ? Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
    The technical info pop-up shows not only the field information but also the program and screen.
    ? For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
    Note the following information:
    - The field name for batch input, which you?ll find in its own box.
    - The length and data type of the field. You can display this information by double clicking on the Data Element field.
    ? Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
    Once you have program name, screen number, field name (screen field name), you can start writing.
    DATA TRANSFER program.
    Declaring internal table
    First Integral Table similar to structure like local file.
    Declaring internal table like BDCDATA
    The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.
    The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.
    This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:
    ? Create a BDCDATA structure
    ? Write the structure out to a session or process it with CALL TRANSACTION USING; and then
    ? Create a BDCDATA structure for the next transaction that is to be processed.
    Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.
    The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:
    ? Data that is entered into screen fields.
    ? Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.
    The BDCDATA structure contains the following fields:
    ? PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.
    ? DYNPRO: Screen Number. Set this field only in the first record for the screen.
    ? DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ? ? (blank) for all other records.)
    ? FNAM: Field Name. The FNAM field is not case-sensitive.
    ? FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.
    Transferring data from local file to internal table
    Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.
    Population of BDCDATA
    For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.
    All these five initial steps are necessary for any type of BDC interface.
    DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.
    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
    SESSION METHOD
    About Session method
    In this method you transfer data from internal table to database table through sessions.
    In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
    Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
    When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
    Unless session is processed, the data is not transferred to database table.
    BDC_OPEN_GROUP
    You create the session through program by BDC_OPEN_GROUP function.
    Parameters to this function are:
    ? User Name: User name
    ? Group: Name of the session
    ? Lock Date: The date on which you want to process the session.
    ? Keep: This parameter is passed as ?X? when you want to retain session after
    processing it or ? ? to delete it after processing.
    BDC_INSERT
    This function creates the session & data is transferred to Session.
    Parameters to this function are:
    ? Tcode: Transaction Name
    ? Dynprotab: BDC Data
    BDC_CLOSE_GROUP
    This function closes the BDC Group. No Parameters.
    Some additional information for session processing
    When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
    However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.
    If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
    CALL TRANSACTION
    About CALL TRANSACTION
    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>
    Messages into <MSGTAB>.
    Parameter ? 1 is transaction code.
    Parameter ? 2 is name of BDCTAB table.
    Parameter ? 3 here you are specifying mode in which you execute transaction
    A is all screen mode. All the screen of transaction are displayed.
    N is no screen mode. No screen is displayed when you execute the transaction.
    E is error screen. Only those screens are displayed wherein you have error record.
    Parameter ? 4 here you are specifying update type by which database table is updated.
    S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
    A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
    Parameter ? 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
    1. Tcode: Transaction code
    2. Dyname: Batch point module name
    3. Dynumb: Batch input Dyn number
    4. Msgtyp: Batch input message type (A/E/W/I/S)
    5. Msgspra: Batch input Lang, id of message
    6. Msgid: Message id
    7. MsgvN: Message variables (N = 1 - 4)
    For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
    Steps for CALL TRANSACTION method
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
    4. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>.
    Refresh BDCTAB.
    Endloop.
    (To populate BDCTAB, You need to transfer each and every field)
    The major differences between Session method and Call transaction are as follows:
    SESSION METHOD CALL TRANSACTION
    1. Data is not updated in database table unless Session is processed. Immediate updation in database table.
    2. No sy-subrc is returned. Sy-subrc is returned.
    3. Error log is created for error records. Errors need to be handled explicitly
    4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.
    Error Handling in CALL TRANSACTION
    When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:
    Steps for the error handling in CALL TRANSACTION
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. Internal table BDCMSG like BDCMSGCOLL
    4. Internal table similar to Ist internal table
    (Third and fourth steps are for error handling)
    5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)
    6. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tr.code> using <Bdctab>
    Mode <A/N/E>
    Update <S/A>
    Messages <BDCMSG>.
    Perform check.
    Refresh BDCTAB.
    Endloop.
    7 Form check.
    IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).
    Call function Format_message.
    (This function is called to store the message given by system and to display it along with record)
    Append itab2.
    Display the record and message.
    DIRECT INPUT
    Thanks &regards,
    Sravani

  • Shortcut for transaction/report with variant?

    Hi!
    Is there a possibility to create a shortcut for a report/variant and a specific variant for that transaction?
    I do not know, how to implement the variant into a shortcut.
    E.g. I want to use the shortcut to call up the transaction CNS47 with the variant ORDERS.
    Thanks,
    Stefan

    hi,
    afaik, it is not possible to assign multiple variant in a tcode using SE93, cmiiw.
    but an idea is copying original CNS47 into ZTcode (customize) : ZCNS47a,  ZCNS47b, ZCNS47c and so on, and then assign each (different) variant to ZCNS47a, ZCNS47b, ZCNSc and so on.
    not a great idea, but may resolve your issue.
    rgds,
    alfonsus guritno

  • Call transaction BDC with different user id

    Hello,
    We have a BDC program for creating Invoice using "CALL TRANSACTION VF01" method. But there are are few user IDs accessing this program who do not have authorisation to VF01. So requirement is to create Invoice with a common user id.
    Please help if it is possible to call transaction with different user id. Please also provide you inputs if you can suggest some other way to fulfill this requirement.
    Thanks & Regards,
    Rohit

    Hi Rohit,
    if users are not authorized to post invoice, why is it required to surpass the checks?
    A Question the business should answer.
    It should not be the consultants obligation to find doubtable ways.
    Regards
    Clemens

  • CALL TRANSACTION ME21N with purch.Requis. (trolly)

    Hi all,
    please, help me.
    in custom program I have to call the transaction ME21N  (call transaction)
    but..... with a  purchase requisition already selected.
    with ME21N there is the possibility of selecting a purchase requisition and drag it to the TROLLY.
    The purchase order will import the positions of  PR.
    I can not able do this with a Batch Input.
    those of you who know the solution to my problem?
    thanks in advance,
    Marco.

    Hi, look at this Purchase order and Sales Document maintain in dialog mode

  • Problem with CALL TRANSACTION 'VA33' with PARAMETER ID 'AUN'

    I started to post this as a problem, but stumbled into the solution while testing further.  Since I didn't find a solution in the SDN.SAP Forums I'm entering this to help others who may have the same problem.
    This code would not work:
          SET PARAMETER ID 'AUN' FIELD sy-lisel(10).   "sy-lisel(10) contains the Scheduling Agreement on the selected line of the report.
          CALL TRANSACTION 'VA33' AND SKIP FIRST SCREEN.
    It would go to Transaction VA33 but would always default to the last Scheduling Agreement accessed manually instead of the one I needed to see via this call.
    When I change the transaction to VA03 it works:
          SET PARAMETER ID 'AUN' FIELD sy-lisel(10).
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    We can not access a Scheduling Agreement from VA03 on-line, but for some reason this call displays the correct S/A, and System Status says it is running transactin VA03. 
    Perhaps it is because we are using a custome Order Type for Scheduling Agreements (YALZ)?
    Best wishes to our SAP friends.

    Hi,
    VA33 is for schedulinng Agreement so use..
    SET PARAMETER ID 'LPN' FIELD sy-lisel(10).
    AUN - Order number
    LPN - Scheduling agreement number
    now it works..
    Regards,
    Sathish Reddy.

  • How to create a job thru ABAP program for calling a program with variant???

    Hello experts,
    can u give me step wise procedure to create jobs for  a program with a variant name thru ABAP???
    Also, can a transaction can be scheduled as a job to run in background with a variant name???
    Edited by: SAP USER on Jul 22, 2008 6:08 AM

    Hi,
    To create a job through ABAP program you can do the following.
    Go to Menu bar.
    In there, go to   SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
    Then give the JOB NAME and CLASS in the screen that comes up.
    This is how we schedule a program.
    Now, to create a variant for a program -
    First activate your program in SE38. Then execute it .
    Now, click on SAVE button. It will open up  the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
    Hope this helps.
    Regards,
    Hari Kiran

  • ABAP WebDynpro app calling Transaction iview with Dynamic Parameters..?

    Good day!
    I need to code a call to a transaction (with dynamic parameters) from an Abap WD application.  It appears that to achieve this, the app needs to call a new portal transaction iview, passing the parameters in the call..? 
    This should ideally be via a Sapgui for Windows, but Html also an option (does it matter with regards to the method used?). 
    Kindly assist with advise/instructions, idealy with sample code extract to illustrate (new to Abap WD)...
    Kind regards
    j

    Hi
    this will help you doing so
    http://help.sap.com/saphelp_nw04s/helpdata/en/18/f96f4132f15c58e10000000a1550b0/frameset.htm
    Use BUSINESS_PARAMETERS to pass the data
    Abhi

  • Call transaction variant  - crmd_order

    Hi,
    i have created a new transaction variant for cmrd_order. I'm trying to call the new tcode (zcrmd_order) in the abap code by passing the order number using call transaction.
    i have used the call transaction ..with bdcdata mode 'E' and im having problems. it works fine ...but now and then it displays the pop up box and couldnt figure out why.
    is there a better way of calling this transaction variant.
    Thanks,
    kris.

    Hi Sandra,
    i'm using the following statement
    Call transaction 'ZCRMD_ORDER'  using t_bdcdata options from T_opt .
    Some users are getting the pop-up box while for others its working fine. it works fine when the call transaction statement is being called for the first time. But when its called for the second time, this pop-up box appears.
    Not sure why this is happening.
    I have recorded the  screens and passed those to bdcdata tab and didn't use skip first screen.
    Let me know where i'm going wrong.
    Thanks,
    kris.

  • Calling Transaction SP01 (Display spool requests) with parameters via URL

    Hi,
    I would like to be able to list all spool requests of a certain title via a URL.
    Unfortunately ITS does not seem to work. A URL constructed like this
    http://host:port/sap/bc/gui/sap/its/webgui/!?sap-system-login-basic_auth=X&sap-client=500&sap-language=EN&transaction=SP01&S_RQTITL-LOW=Testing123&okcode=CRET
    causes a short dump that SP01 (Program RSOSP01NR) is a Module Pool.
    I am therefore considering the following options:
    1. BSP Program
    2. Java WebDynpro
    3. ABAP WebDynpro
    Ideally, I want to be able to enter in my browser something like
    http://host:port/<BSP_or_WebDynPro_stuff>&~title=Testing123
    and for this to show in the browser a list of all spool requests that are named "Testing123".
    Can someone advise whether any of the above options are preferable?
    Also, whether such a program should call transaction SP01 with parameters (skipping first screen) or look to using the associated function modules.
    Many thanks for any assistance.
    Regards
    Adrian

    Solved myself. Thanks

  • Call a Transaction iView with parameters

    Hello,
    can anyone help me with the following problem:
    I'll just tried to call the transaction RECN with a transaction iView. When I test the iView it works but not with any parameters in the URL.
    I'll tried the parameters fix in the iView properties but without any result.
    Can someone tell me the correct syntax? I'll tried everything I can find in the SAP help and here in the forum.
    Have someone a how to for calling transaction iView with dynamical parameters?
    Thanks for help!
    Best regards
    Martin

    Martin,
    Have you had a look at these yet?
    http://wiki.sdn.sap.com/wiki/display/EP/StartanSAPtransactionfromaURL
    How to launch SAP transaction & pass parameters via URL
    Cheers!
    Sandeep Tudumu

  • Call program using submit with variant that changing value

    Hi All,
    I need to call a report with variant and abstract the data back to my current program.
    so far,
    i use following method
    SUBMIT RFITEMAR USING SELECTION-SET 'XXX'
           EXPORTING LIST TO MEMORY
           AND RETURN.
    DATA list_tab TYPE TABLE OF abaplist.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
      DATA: L_ABAPLIST LIKE ABAPLIST OCCURS 0.
      DATA: BEGIN OF L_ASCITAB OCCURS 0, 
                LINE(2048),
              END OF L_ASCITAB.
      CALL FUNCTION 'LIST_TO_ASCI'
           EXPORTING
                LIST_INDEX         = -1
           TABLES
                LISTASCI           = L_ASCITAB
                LISTOBJECT         = list_tab
           EXCEPTIONS
                EMPTY_LIST         = 1
                LIST_INDEX_INVALID = 2
                OTHERS             = 3.
    However, the problem is that i need to get some value from variant 'XXX' and keep changing it.
    I have try function module "RS_VARIANT_VALUES_TECH_DATA" to get the variant details.
    But, it just doesn't get me back all the details of the variants.
    Are there any way i could read the variants in detail? i even try to read LRAW data from table vari. but there are no function module to convert the LRAW to either char or STRING.
    Thanks.
    Edited by: simplekx on Jun 20, 2011 4:43 PM

    You can use the FM "RS_CHANGE_CREATED_VARIANT" to change the variant values for already created variant and the FM "RS_VARIANT_CONTENTS" to get the variant values. Instead of changing the variant values and then passing to the Submit, you can directly pass the values to the Submit through..WITH SELECTION-TABLE seltab or ... WITH p IN sel variant of the Submit.

  • What are the parameters in Call transaction method?

    Hi ABAPER'S,
        Please give me what are the parameters in call transaction method?
    Thanks,
    Prakash

    Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
    Syntax:
    CALL TRANSACTION <tcode>
    USING <bdc_tab>
    MODE  <mode>
    UPDATE  <update>
    <tcode> : Transaction code
    <bdc_tab> : Internal table of structure BDCDATA.
    <mode> : Display mode:
    A
    Display all
    E
    Display errors only
    N
    No display
    <update> : Update mode:
    S
    Synchronous
    A
    Asynchronous
    L
    Local update
    A program that uses CALL TRANSACTION USING to process legacy data should execute the following steps:
    Prepare a BDCDATA structure for the transaction that you wish to run.
    With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
    CALL TRANSACTION 'TFCA' USING BDCDATA
    MODE 'A'
    UPDATE 'S'.
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC <> 0.
    <Error_handling>.
    ENDIF.
    The MODE Parameter
    You can use the MODE parameter to specify whether data transfer processing should be displayed as it happens. You can choose between three modes:
    A Display all. All screens and the data that goes in them appear when you run your program.
    N No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished.
    E Display errors only. The transaction goes into display mode as soon as an error in one of the screens is detected. You can then correct the error.
    The display modes are the same as those that are available for processing batch input sessions.
    The UPDATE Parameter
    You use the UPDATE parameter to specify how updates produced by a transaction should be processed. You can select between these modes:
    A Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.
    Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.
    If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.
    S Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
    L Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
    The MESSAGES Parameter
    The MESSAGES specification indicates that all system messages issued during a CALL TRANSACTION USING are written into the internal table <MESSTAB> . The internal table must have the structure BDCMSGCOLL .
    You can record the messages issued by Transaction TFCA in table MESSTAB with the following coding:
    (This example uses a flight connection that does not exist to trigger an error in the transaction.)
    DATA: BEGIN OF BDCDATA OCCURS 100.
    INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    DATA: BEGIN OF MESSTAB OCCURS 10.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF MESSTAB.
    BDCDATA-PROGRAM = 'SAPMTFCA'.
    BDCDATA-DYNPRO = '0100'.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    CLEAR BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CARRID'.
    BDCDATA-FVAL = 'XX'.
    APPEND BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CONNID'.
    BDCDATA-FVAL = '0400'.
    APPEND BDCDATA.
    CALL TRANSACTION 'TFCA' USING BDCDATA MODE 'N'
    MESSAGES INTO MESSTAB.
    LOOP AT MESSTAB.
    WRITE: / MESSTAB-TCODE,
    MESSTAB-DYNAME,
    MESSTAB-DYNUMB,
    MESSTAB-MSGTYP,
    MESSTAB-MSGSPRA,
    MESSTAB-MSGID,
    MESSTAB-MSGNR.
    ENDLOOP.
    The following figures show the return codes from CALL TRANSACTION USING and the system fields that contain message information from the called transaction. As the return code chart shows, return codes above 1000 are reserved for data transfer. If you use the MESSAGES INTO <table> option, then you do not need to query the system fields shown below; their contents are automatically written into the message table. You can loop over the message table to write out any messages that were entered into it.
    Return codes:
    Value
    Explanation
    0
    Successful
    <=1000
    Error in dialog program
    > 1000
    Batch input error
    System fields:
    Name:
    Explanation:
    SY-MSGID
    Message-ID
    SY-MSGTY
    Message type (E,I,W,S,A,X)
    SY-MSGNO
    Message number
    SY-MSGV1
    Message variable 1
    SY-MSGV2
    Message variable 2
    SY-MSGV3
    Message variable 3
    SY-MSGV4
    Message variable 4
    Error Analysis and Restart Capability
    Unlike batch input methods using sessions, CALL TRANSACTION USING processing does not provide any special handling for incorrect transactions. There is no restart capability for transactions that contain errors or produce update failures.
    You can handle incorrect transactions by using update mode S (synchronous updating) and checking the return code from CALL TRANSACTION USING. If the return code is anything other than 0, then you should do the following:
    write out or save the message table
    use the BDCDATA table that you generated for the CALL TRANSACTION USING to generate a batch input session for the faulty transaction. You can then analyze the faulty transaction and correct the error using the tools provided in the batch input management facility.

  • How to clear all selection screen parameters before calling transaction?

    Hi Experts
       I have a ABAP report that displays data using ALV.
      When I double click a cell it calls transaction MB51. Before calling the transaction I need to set some parameters of the selection screen  of the transaction.
      My code is like below:
      <UL>
       <LI>FREE MEMORY ID 'MAT'. <I>"material</I>
       <LI> FREE MEMORY ID 'WRK'. <I>"plant</I>
       <LI> FREE MEMORY ID 'CHA'. <I>"batch</I>
       <LI><I>* Get the selected ALV row data</I>
       <LI>READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
       <LI><I>*   If link MB51 is clicked then open tcode MB51</I>
       <LI> IF p_selfield-sel_tab_field+8(4) = 'MB51'.
       <LI><I>*   Pass material, plant to the corresponding tcode</I>
       <LI>       SET PARAMETER ID 'MAT' FIELD x_recon-matnr.
       <LI>       SET PARAMETER ID 'WRK' FIELD p_plant.
        <LI>      CALL TRANSACTION 'MB51' AND SKIP FIRST SCREEN.
    </UL>
    The problem is:
    <UL> <LI> 1. First, I run the given transaction before running the report in a separate session with some set of values in the selection screen. For example: plant = AB01, Material = 990001 and Batch = 10001.</LI>
    </UL>
    <UL>
            <LI> 2. Then in another session I run my report. In the report ALV I have selected a record where plant = AB01, Material = 990001 but Batch is blank. But it opens the transaction with plant = AB01, Material = 990001 and Batch = 10001.
    Even though in my ALV record the batch is blank yet it uses the batch value from the memory. That is, the batch value that was given in the transaction earlier. Why it is not getting cleared? I have also used FREE MEMORY ID code in the beginning. But still it is not clearing the values in the memory.
    </UL>
    <UL>
            <LI>What shall I do to clear all the selection screen parameters before calling the transaction?</LI>
    </UL>
    <UL>
            <LI>
    Thanks
    Gopal
    </LI>
    </UL>
    Edited by: gopalkrishna baliga on Aug 11, 2010 10:29 AM

    Its because sap memory is globally shared.
    Do it like this.
    READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
    IF p_selfield-sel_tab_field+8(4) = 'MB51'.
    perform bdc_dynpro      using 'RM07DOCS' '1000'.
    perform bdc_field       using 'BDC_OKCODE'   '=ONLI'.
    perform bdc_field       using 'MATNR-LOW'  x_recon-matnr.
    perform bdc_field       using 'WERKS-LOW'  p_plant.
    perform bdc_field       using 'CHARG-LOW'  p_batch.
    perform bdc_field       using 'DATABASE'  'X'.
    call transaction 'MB51' with i_bdcdata mode 'E'.
    endif.
    form bdc_dynpro using program dynpro.
      clear la_bdcdata.
      la_bdcdata-program  = program.
      la_bdcdata-dynpro   = dynpro.
      la_bdcdata-dynbegin = 'X'.
      append la_bdcdata to i_bdcdata.
    endform.
    form bdc_field using fnam fval.
        clear la_bdcdata.
        la_bdcdata-fnam = fnam.
        la_bdcdata-fval = fval.
        append la_bdcdata to i_bdcdata.
    endform.

  • Call transaction method in back ground Processing?

    HI Friends,
    I am working on interface program to post documents of 309 movement type into MIGO transaction .
    my program is executing succesfully when i am processing  in fore ground.
    but when i am processing in background it is giving error .
    can any help in this requirement?
    *Solution rewarded*

    My Program will do transfer Posting from material to material.
    when i am executing the program in back ground mode The Program statement call transaction fails with the following error
    CALL_TRANSACTION MIGO_TR Return code = 1,001  RECORD:          0
    S
    Field GODYNPRO-ACTION . is not an input field
    S
    Field GODYNPRO-REFDOC . is not an input field
    S
    Field GOITEM-UMMAKTX . is not an input field
    S
    similar statement when executing in foreground it is posting document succesfully.
    kindly revert back for any other information.

Maybe you are looking for