How to avoid use of function module in case of background jobs?

Hi ,
       I am working a file tranfer interface .Functionality is to extract file either apllication or presentation server , and process the file  through bapi , send the  result in their respective server. This program should run through batch jobs in background mode.
I am using following function module :
  SUBST_GET_FILE_LIS : Get the file list from application server
TMP_GUI_DIRECTORY_LIST_FILES : Get the file list from presentation server
GUI_UPLOad : to extract file data   from presentation server
GUI_downLOAD : to download data  to presentation server
in case of background job these function modules will not work.... so how to resolve this issue...
what are the methods we can apply?
Thanks & Regards
Sandeep

Hi,
This FM is used to get list of files from Application server (will work in Background). This cannot be used to list files from presentation server.  There is no way , by which you can process presentation server files in background mode.
Regards
Vinod

Similar Messages

  • How can i use reuse_alv_fieldcatalog_merge function module

    I am using below steps for populating the final internal table.How can I use reuse_alv_fieldcatalog_merge function module in the place of declaring all these fields.How canI put title of the report in reuse_alv_fieldcatalog_merge function module.
    FORM BUILD_FIELDCATALOG .
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'KUNNR'.
      FIELDCAT-SELTEXT_M = 'Customer Name'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-KEY       = 'X'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'VBELN'.
      FIELDCAT-SELTEXT_M = 'Invoice Reference'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-KEY       = 'X'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'VKBUR'.
      FIELDCAT-SELTEXT_M = 'Sales Office'.
      FIELDCAT-JUST      = 'L'.
    FIELDCAT-KEY       = 'X'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'VKGRP'.
      FIELDCAT-SELTEXT_M = 'Sales Person'.
      FIELDCAT-JUST      = 'L'.
    FIELDCAT-KEY       = 'X'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'POSNR'.
      FIELDCAT-SELTEXT_M = 'Item No'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-KEY       = 'X'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FIANL'.
      FIELDCAT-FIELDNAME = 'ARKTX'.
      FIELDCAT-SELTEXT_M = 'Item Description'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.

    Hello,
    It is very easy to use reuse_alv_fieldcatalog_merge.
    You try this it will work.
    example
    data:
    DATA : gv_repid        TYPE syrepid VALUE sy-repid .  " Report id
      PERFORM set_field_catalog USING gst_struct CHANGING lst_fieldcat.
    FORM set_field_catalog  USING uv_tab TYPE slis_tabname
                         CHANGING  xt_fieldcatalog TYPE slis_t_fieldcat_alv.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = gv_repid
          i_internal_tabname     = uv_tab
          i_inclname             = gv_repid
        CHANGING
          ct_fieldcat            = xt_fieldcatalog
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      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.                    " set_field_catalog_spec

  • How can i use this  function module

    Hai
    How can i use this function module /SAPHT/SALES_ORDER_READ, already apply the some parameters in this function module, but it shows the error , please tell me, how to declare the parameters in this function module ,
    thanks
    neelima

    Hi
    For a particular sales order,you have to pass the order number and the item number in the sales order.
    It will display the rest of the values which u can capture them using internal tables.
    Regards,
    Vishwa.

  • How can we use SX_OBJECT_CONVERT_OTF_INTO_PDF function module IN SCRIPT

    Hi Gurus,
    can any one inform me,how to use  SX_OBJECT_CONVERT_OTF_INTO_PDF  function module in script..
    how can we convert  the script output into pdf file format....
    i need your help......plz
    my mail id : [email protected] 
    Thanks,
    Rajkumar.A
    Edited by: rajkumar annadurai on Feb 19, 2008 10:25 AM

    Hi, Dear
    In XI 3.0 we are tyring to setup SAPconnect;
    1 Step; Create RFC connection for Mlunxsnd file, anyway!!! we download thease file and create RFC connection; fine working no error
    2 Step: Create Nodes T-code SCOT => connection INT => and support address type like Internet its just show only "PDF, HTM, TXT" thats it its not show some others format
    3. Step; When check email T-code SOST Getting an error messages: "Connot process message in node, parameters cannot be converted"
    4. In R3 RPD and Others system when I check format its ok its show some others format which is support to be such as "ALI, OBJ, OTF, SCR, URL" ...
    How may install these format in XI 3.0
    Please Advice I will be really appriciated
    Thanks a lot
    Travis

  • How we will use bapi function modules Ex. BAPI_SALESORDER_CHANGE

    How we will pass the parameters to this Function Module.
    What is the step by step process .

    HI,
    Check this code... Here this program is changing the delivery block for a sales order.. like this you just need to identify what you want to change and pass data to the bapi as required.
    DATA: BAPISDH1X LIKE BAPISDH1X.
    DATA: BAPISDH1 LIKE BAPISDH1.
    PARAMETERS: P_VBELN LIKE VBAK-VBELN OBLIGATORY.
    PARAMETERS: P_LIFSK  LIKE VBAK-LIFSK OBLIGATORY.
    Header
    BAPISDH1-DLV_BLOCK = p_lifsk.   " Delivery block
    header X
    BAPISDH1X-DLV_BLOCK = 'X'.   " Delivery block
    BAPISDH1X-UPDATEFLAG = 'U'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = P_VBELN
    order_header_in   = BAPISDH1
    order_header_inx = BAPISDH1X
    tables
    return = T_RETURN
    LOOP AT T_RETURN WHERE TYPE = 'E' OR TYPE = 'A'.
      EXIT.
    ENDLOOP.
    Check for error messages.
    IF SY-SUBRC = 0.
      WRITE: / 'Sales order not updated', T_RETURN-MESSAGE.
    ELSE.
    Successfully updated
      WRITE: / 'Sales order updated'.
    ENDIF.
    COMMIT WORK.
    Thanks
    mahesh

  • Function Module to run as Background Job

    Hi All
    Could anyone tell how can i run a RFC function module as Background job,
    Right now, one external application calling this RFC FM, when this is getting executed, i can see a dialog process is occupied in SM50. Now o avoid this, i want when external application calls this RFC FM, it should get executed as a background job in SM50.
    Regards
    Munish Garg

    Hi Minish,
    Normally, we can call an RFC in background task as below:
    CALL FUNCTION func IN BACKGROUND TASK
                         [DESTINATION dest]
                         parameter_list
                         [AS SEPARATE UNIT].
    But I am not sure whether your external application can call this RFC in background. But you can create an another RFC and inside call this RFC in background.
    Then call the new RFC so that it will internally call the required RFC in background and Immediately after it will be closed.
    Regards,
    Selva K.

  • How can I use a function in a Case or IIF?

    Hi everyone,
    I'm trying to use an Intersect function in a IIF function, but I have this error: Syntax error input MDX query on line 6 at token "="
    Here I'm trying to intersect some sets, and after that I try to check if the result is equal to [2012].
    If I'm trying to have a simple check, like IIF ([2012]=[2012],[2012],[2013]), it's working.
    But I need to put somehow a function there. Maybe not to use the IIF or CASE function..
    This is my query:
    SELECT
    [Account].[1234],[Account].[4566]
    } DIMENSION PROPERTIES MEMBER_ALIAS, GEN_NUMBER, MEMBER_ALIAS, GEN_NUMBER ON COLUMNS,
    IIF( Intersect  ( {[2012],[2013]}, {[2012]} )=[2012], [2012], [2013] )
    } DIMENSION PROPERTIES MEMBER_ALIAS, GEN_NUMBER ON ROWS
    FROM [MyCUBE].[main]
    WHERE ([Jan])
    CELL PROPERTIES VALUE
    Thank you a lot!

    I have the function:
    CREATE OR REPLACE FUNCTION verificar_NIF (nif varchar2) return boolean as
    l_check_digit constant varchar2(23) := 'TRWAGMYFPDXBNJZSQVHLCKE';
    l_mod number;
    l_result varchar2(1);
    l_return boolean := false;
    begin
    l_mod := mod(substr(nif, 1, 8), 23);
    l_result := substr(l_check_digit, l_mod+1, 1);
    if l_result = substr(nif, 1, 9) then
    l_return := true;
    end if;
    return l_return;
    end;
    And I have the table:
    CREATE TABLE Clients (
         id_client NUMBER(5) PRIMARY KEY,
         nif VARCHAR2(9),
         cog1 VARCHAR2(50) NOT NULL,
         cog2 VARCHAR2(50) NOT NULL,
         nom VARCHAR2(50) NOT NULL,
         adre VARCHAR2(50) NOT NULL,
         Poblacio VARCHAR2(40) NOT NULL,
         CONSTRAINT err_NIF CHECK ( verificar_NIF(nif)=true )
    I want the var nif to have a concert value. It is correct to check in that way?

  • "CNTL_ERROR" raised , when using a Function Module

    Hi All,
    I am trying to reuse an existing Function module. This function module, fetches data in an internal table and creates a popup using ALV, using the Call Screen statement. I cannot modify this function module.
    Is there any method, how I can use this Function Module in Web Dynpro Application(which would be executed from portal) , because if I use it directly, I get an error .. Exception condition " CNTL_ERROR" raised as the Custom Container object doesn't get created. As far as  I understand, we cannot use such a function module directly, but please let me know if there Is any work around apart from creating a new function module.
    Best Regards,
    Preethi Santhanam.

    Refer these threads (Ans by Thomas) :
    CNTL_ERROR while calling an FM through WebDynpro

  • HR ABAP - Using of function module HR_READ_INFOTYPE

    Hi,
    I want to replace the below SELECT statement with the function module by HR_READ_INFOTYPE.
    IF l_begda LE '20100331'.
              l_assgnda = '20100401'.
            ELSE.
              l_assgnda = l_begda.
            ENDIF.
    SELECT SINGLE werks
            FROM pa0315
            INTO e_t_data-zz_werks
            WHERE pernr = wa-pernr
            AND endda GE l_assgnda   
            AND begda LE l_assgnda.
    But the problem is, in the where condition i have to use LE or GE condition for endda and begda. So how can i use  the function module  for replacing the select statement without changing the functionality.

    Hi,
    You are selecting a single entry... So you will just need to pass the variable l_assgnda to the BEGDA and ENDDA parameters of the FM...
    added: also, if that infotype can have concurrent records (but in that case the select is not correct), you will have to take the first one from INFTY_TAB...
    Cheers,
    Manu.
    Edited by: Manu D'Haeyer on Dec 29, 2011 2:40 PM

  • How to use read_text function module

    Hi how to use read_text function module to read purchase order header text .what are all tht things to pass in ID,Name and Object
    thanks,
    Mahe

    Dear,
    Use below code.
    DATA:IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
    V_TDNAME LIKE THEAD-TDNAME.
    V_TDNAME = PO_NUMBER.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
    *   CLIENT                        = SY-MANDT
        ID                            = 'F01'
        LANGUAGE                      = 'EN'
        NAME                          = V_TDNAME
        OBJECT                        = 'EKKO'
      TABLES
        LINES                         = IT_LINE.
    Thanks and Regards,

  • How to keep long text in bdc using create_text  function module

    hi,
    ihave bdc in that i having field like long text i have to upload the long text using create_text function module how to use and where to use in bdc. wat parameters i have to pass exactly.
    i need some other information like how can i pass this to BDC i got like this .
    can u plz check it.
    its a length of 255 chaters
    perform bdc_field using 'RSTXT-TXLINE(02)'
    'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
    & 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'.
    perform bdc_field using 'RSTXT-TXLINE(03)'
    'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    & 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
    perform bdc_field using 'RSTXT-TXLINE(04)'
    'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
    & 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'.
    perform bdc_field using 'RSTXT-TXLINE(05)'
    'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
    & 'hhhhhhhhhhhhhhhhhhhhhh'.

    Hi,
    Use this coding where do u want,
    data: begin of textline occurs 10.
            include structure tline.
    data: end of textline.
    start-of-selection.
    textline-tdformat = '*'.
    textline-tdline = 'TESTING FOR CREATION OF TEXT'.
    append textline.
    clear textline.
        call function 'CREATE_TEXT'
             exporting
                  fid       = '0013'
                  flanguage = sy-langu
                  fname     = '0095000501'
                  fobject   = 'VBBK'
             tables
                  flines    = textline
             exceptions
                  no_init   = 01
                  no_save   = 02.
    end-of-selection.

  • How to use these function modules

    Hi all,
    can anyone help that how to use these Function modules to update the status of a task, what are all the inputs i required to proceed
    1. FC_USER_AUTHORITY_CHECK
    <b>2. FC_USER_STATUS_CHECK
    3. FC_USER_STATUS_UPDATE</b>
    4. FC_USER_GET_CACTI
    5. FC_USER_CHECK_FOR_OUTPUT
    Thanks in Advance
    Ganesh

    Hi Rob,
    thanks for ur reply,
    but they are not clear what they are meant to be, I understood there are some flags needed to run the Function Modules 2 & 3 which are in bold...
    but how do i populate them.. i am not getting that..
    thanks
    ganesh

  • How to use BAPI_MATERIAL_AVAILABILITY Function Module at batch level?

    How to use BAPI_MATERIAL_AVAILABILITY FM to check material available at batch level?
    And another question is what's the meaning of 'CHECK_RULE' in this FM. Thanks!

    Field name : PRREG
    fcheck more details on  f1 help...
    check_group defines the checking procedure to be used for  availability check in individual applications.
    along with the checkg group, checking rule  specifies the final procedure for chkg..
    eg:
    ST  for  stock transport order
    AQ for SD order project srock
    also chk this help doc.
    http://help.sap.com/saphelp_470/helpdata/en/cf/70124adf2d11d1b55e0000e82de178/content.htm
    search the forum for sample code..
    How to use BAPI_MATERIAL_AVAILABILITY Function Module....

  • How to use BAPI_WARRANTYCLAIM_CHANGE2  function module

    i am unable to pass values to table  parameter.
    for above i have used WTY12_CLAIM_READ function module and i have give only cliam number as input and tried retriving other parameters(tables)
    from these i passed same table parameters to BAPI_WARRANTYCLAIM_CHANGE2  function module but unable to run it in se37.
    please just me any logic or solution to this.
    i am getting repeated error as :
    1)item types
    2)pricing
    3)partner
    if any one can send me a sample code to how to use these bapi .
    thanks,
    lokesh

    Hi Lokesh,
    I believe you are using the FM WTY12_CLAIM_READ_RFC to retrieve the claims related information by just passing Claim Number, and you are not getting any data back from the function module in the table parameters and you won't get any values as well, as there is no code in that function module.
    Thanks,
    Mahesh.

  • How to use BAPI_MATERIAL_AVAILABILITY Function Module....

    Hi Experts,
    I want to know actual free available quantity (ATP Qty.) for mass materials,
    How to use BAPI_MATERIAL_AVAILABILITY function module ?
    I have select all material from MARA and inserted in itab.
    LOOP AT ITAB.
    CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
      EXPORTING
        PLANT                    =
        MATERIAL                 =
        UNIT                     =
      CHECK_RULE               =
      STGE_LOC                 =
      BATCH                    =
      CUSTOMER                 =
      DOC_NUMBER               =
      ITM_NUMBER               =
      WBS_ELEM                 =
      STOCK_IND                =
      DEC_FOR_ROUNDING         =
      DEC_FOR_ROUNDING_X       =
      READ_ATP_LOCK            =
      READ_ATP_LOCK_X          =
    IMPORTING
      ENDLEADTME               =
      AV_QTY_PLT               =
      DIALOGFLAG               =
      RETURN                   =
      TABLES
        WMDVSX                   =
        WMDVEX                   =
    I dont know how to use it.
    pl. guide us.
    Yusuf

    Hi,
           data:  iwmdvsx type table of bapiwmdvs with header line,
           iwmdvex type table of bapiwmdve with header line.
    parameters: p_matnr type mara-matnr,
                p_werks type marc-werks,
                p_meins type mara-meins.
    call function 'BAPI_MATERIAL_AVAILABILITY'
      exporting
        plant            = p_werks
        material         = p_matnr
        unit             = p_meins
      CHECK_RULE       =
      STGE_LOC         =
      BATCH            =
      CUSTOMER         =
      DOC_NUMBER       =
      ITM_NUMBER       =
      WBS_ELEM         =
      STOCK_IND        =
    IMPORTING
      ENDLEADTME       =
      AV_QTY_PLT       =
      DIALOGFLAG       =
      RETURN           =
      tables
        wmdvsx           = iwmdvsx
        wmdvex           = iwmdvex.
    check sy-subrc = 0.
    Text
    ATP information
    Functionality
    Using this function module, you can determine the receipt quantity still available for a particular material in a certain plant according to ATP logic (MRPII).
    The availability check is carried out on transferring the material number, the plant and the input table (WMDVSX). The scope of the check, that is, which stocks, receipts and issues are to be included in the check is defined by the combination of checking group (material master) and cheking rule. In the function module, the system uses the checking rule defined in Sales & Distribution (A). You can overrule this checking rule by using an interface or a user-exit (exit_saplw61v_001). A similar procedure is also valid for the plant parameters. The customer number in the user-exit means that the plant selection can be controlled via the customer. If no plant parameters are given via the interface, the system uses the parameter 'WRK' saved in the user's fixed values.
    The results of the availability check are recorded in the output table (WMDVEX). This table contains dates and available receipt quantities (ATP quantities). The results of the check depends on the following entries:
    If no date and no quantity is transferred, the system displays the ATP situation from today's date into the future as the result.
    If only a date and no quantity is transferred, the system displays the ATP situation from the corresponding date as the result.
    If both a date and a quantity are transferred, the system calculates the availability situation for the quantity specified.
    In the last two cases, the parameter 'DIALOGFLAG' is supplied. This can result in the following:
    ' ' (blank)   <=> quantity completely available
    'X'           <=> only partial quantity available or not available at
                      all
    'N'           <=> Material not included in the availability check
                      (Material not relevant to the availability check)
    The system also displays the end of the replenishment lead time (ENDLEADTME).
    regards

Maybe you are looking for

  • Error messages when trying to install itunes

    I keep getting the message "could not write value to key\software\classes\.rmp\openwithlist\itunes.exe PLEASE HELP ME.... i'm about the throw the computer out the window! thanks.

  • How do I get rid of title bar?

    When I installed Firefox on my new Windows 8 computer, I got a style in which there is no title bar. The tabs are up there with an orange Firefox button at the left. It provides access to the menu items. I like that. However, I wanted the function of

  • No ios5 on itunes 10.5?

    i juz update itunes to 10.5, but when i plug in my itouch4g then click check for update, there's no ios5 :( i try click several times but still the answer is "4.3.3 is the current version". why is dat? and how can i get ios5 for my itouch4? :( plz he

  • Extraction KNVV data from ERP via iDOC

    Hi All,   I want to  (mass) extract customer names+data (KNA1) from 4.6 ERP that later has to be loaded into MDM    (to be processed further with MDM/Java applications we develop at SAP).   Also the "favourite" currency of the extracted KNA1 items ar

  • DBMS_XMLDOM.WRITETOFILE overloading

    Hello all. Quick question. I'm running into memory issues when creating my xml file using the DBMS_XMLDOM oracle 9i package. I'd like to write out the file initially and then append to it using DBMS_XMLDOM.WRITETOFILE throughout my program. Similar t