Function module parameters declare BOR Object

I dont know if this is even logical...
I need to create a function module which will be used in my  program..
Can I create an object of BOR object type say 'Sales Order'  and pass it as an export parameter in Function Module..
i.e i will pass the obj key and obj type as import..
I want to instantiate that Sales Order.. and pass the whole Sales oRder as export/tables  parameter..
I know swc_object_create is supposed to create an object but as i can see it only has the handle.. and it is of type swc_object..
But i want to export  the whole Instance .. so that i can call the methods of the object  in my original program..
Regards,
krishna

Hi Ravi ,
I simplified my requirement but my actual requirement is with workflows...
I have a scenario in workflow where,
1.Activity step to fill internal table with sales order numbers
2.loop at sales order numbers internal table
3.Activity Step to Instantiate  based on order numbers
4. Activity Step to Edit these sales orders
5.end the loop
For the above logic in workflows i have separate Activity step for instantiation..What I am thinking of is to instantiate the sales orders and fill the instances in the internal table in Step 1 instead of just order numbers..In the BOR method/F.M  of Step 1 I need to export the Instance of the Sales Orders (this is my actual question/problem, how do i instantiate while coding??swc_object_create, creates only a ref to object ...If I am able to create the object what should the type be in export /tables parameter)
This way i can remove the loop and offer parallel processing (from miscellaneous tab in activity step) and send multiple Edit workitems to user  at Once instead of one after the other..
Please let me also know how you would handle the above situation, i am very new to workflows and BOR.

Similar Messages

  • Problem in  using function module parameters in abap program

    i want to use the coding present in on one of the function module 'AS_API_INFOSTRUC_FIND'  i got the problem using the function module parameters in my abap program.
    these are the parameters inside fm
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_FIELDCAT) TYPE  AIND_FCAT
    *"             VALUE(I_FIELDS) TYPE  TABLE OPTIONAL
    *"             VALUE(I_OBLIGATORY_FIELDS) TYPE  TABLE OPTIONAL
    *"       EXPORTING
    *"             VALUE(E_INFOSTRUC) TYPE  AIND_DESC
    *"             REFERENCE(E_ALL_FIELDS) TYPE  TABLE
    *"             REFERENCE(E_MATCHING_FIELDS) TYPE  TABLE
    *"       EXCEPTIONS
    *"              NO_INFOSTRUC_FOUND
    i want to declare     E_ALL_FIELDS  parameter    in my abap program,
    i have declared as 
    data: E_ALL_FIELDS TYPE TABLE.
    but   the system throws error that
    'type of field 'TABLE'  is generic .no table line has been specified'.
    i want to use it in my abap program how can i declare in my abap program .

    You have to declare the table using any specific type.
    The type table in the FM is generic so you can pass any type you need.
    For instance:
    TYPES: BEGIN OF ty_fields,
             fieldname LIKE dfies-fieldname,
           END OF ty_fields,
    TYPES: TY_T_GLU1              LIKE GLU1                     OCCURS 0,
           ty_t_fields            type ty_fields                occurs 0.
      DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
            lt_matching_fields    TYPE ty_t_fields WITH HEADER LINE.
        CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
             EXPORTING
                  i_fieldcat         = ft_fieldcat-fieldcat
                  i_fields           = ft_fields_filled[]
             IMPORTING
                  e_infostruc        = lv_info_struct_name
                  e_all_fields       = lt_info_struct_fields[]
                  e_matching_fields  = lt_matching_fields[]
             EXCEPTIONS
                  no_infostruc_found = 1.

  • Type conflict in function module parameters

    Hi All,
    i hve to pass dynamic field <dyn_field> into function module parameters but  it's giving a dump for type conflict.
    where VALUE2  data type in 'AUTHORITY_CHECK' is UST12-VON but if i define <dyn_field> type UST12-VON . then it'll give dump in *ASSIGN COMPONENT  SECURITY_TABLE-FIELDNAME  of structure <wa> to <dyn_field> *.
    SECURITY_TABLE-FIELDNAME  data type is different with UST12-VON .
    pls guide me how to pass *<dyn_field> in fm parameters.
    FIELD-SYMBOLS: <dyn_field> type any.
      LOOP AT <DYN_TABLE_IN> INTO <WA>.
            ASSIGN COMPONENT  SECURITY_TABLE-FIELDNAME  of structure
                 <wa> to <dyn_field> .
            CALL FUNCTION 'AUTHORITY_CHECK'
              EXPORTING
                USER                = QUSER
                OBJECT              = SECURITY_TABLE-AUTHOBJCT
                FIELD1              = 'ACTVT'
                VALUE1              = '03'
                FIELD2              = SECURITY_TABLE-FIELDNAME
                VALUE2              = <dyn_field>

    Hi anuj ,,
    Can you explauin the solution ..
    Regards

  • Function module to read Lock objects

    Hi all,
    I'm doing a generic search program for all the objects..
    Is there any function module to read Lock objects....
    that is to know wat r all the tables and Lock parameters are there in a lock object

    Hi Gayathri
    Please read the table DD25L with AGGTYPE = 'E' to get all the lock object names in the field VIEWNAME. Use these lock object to read the table DD27S to get the fields present in these lock objects.
    Hope this helps !
    Regards
    Ranganath
    PS : Reward points for all useful answers !

  • Exposing an RFC-Enabled Function Module as a Callable Object

    Hi All,
    I'm creating a GP Process based on the Exposing an RFC-Enabled Function Module as a Callable Object Tutorial. I'm using the error handling through a structure, the RFC works perfectly when I run it in test mode and the RFC doesn't retrieves exceptions at the structure, but when an error/exception must be returned at the structure, the test is showing this message (and also is not returning any error at the structure):
    "Process exception occurred" and "Callable object implementation did not return output parameters".
    What can be happening?
    I'll appreciate a lot your help, regards,
    María Margarita Monteverde

    Hi,
    Thanks a lot for your answer. My scenario is very simple :
    1) the first callable object contains a web dynpro form where user can enter an ID, a name, and other informations
    2) the second gets the output parameters of the first step and execute the BAPI_FLCUST_CREATEFROMDATA to add the row into the SCUSTOMER table
    The problem is that no row is added. I can integrate BAPI wich allows to read data, but when I try to write (create or change) I cannot see any change.
    Do you see my problem now ?
    Regards,
    Michael.

  • How to findout the Function module for a particular object

    Hello friends,
       Related to my thread, there was one thread in the forum,to find out the function module for a particular object.I tried the solution provided my our experts but couldn't got the results.Thats why i am putting this thread again.
      I want to find out the function modules used for the particular object, i.e. Production order.
       solution i tried is, first go to T.C SE37, then in function module field put the object name like Production order and enter, than it will show another screen, there also put object name in function module field and than press enter, it will show all the function modules available for that object.
        So could you guys help me out to find out where i am wrong in the process of finding out the function module for a particular object.
                           Plz don't bother abt the point.Helpful answers will definitely get awarded.
                                Thanking you guys for your valuable support till now and hoping to get in future too.

    Dear
    When the problem is solved please give points too. Otherwise why people will help others, give time and share their valuable knowledge. This will build up self confidence.
    If not solved and closing, then mention the difficulties what u exactly looking for. Simpy closing is not enough because who ever is providing solution will not able to know the real problem.
    How to give points I believe u already know that and need not explain.
    I had seen many times this problem with others too. Even if the problem is totally resolved they give 2 in stead of 10.
    Edited by: BNR on Sep 21, 2008 6:10 PM

  • ORA-30626: function/procedure parameters of remote object types not support

    Hello,
    I am trying to create a dynamic LOV.
    I have a table and package in a remote database, I am connecting to the database using dblink. When I access package I am getting error
    ORA-30626: function/procedure parameters of remote object types are not supported
    However I can access table with [email protected], not the package!
    How can I solve this problem?

    Did you ever get an answer/workaround to this? I'm having similar problems in 10g.

  • Function module parameters mapping

    Hi Expert,
    We are working on a  upgradation tool in which i have to repace the obsolete function module "HELP_VALUES_GET_WITH_CHECKTAB
    " by "F4IF_FIELD_VALUE_REQUEST
    ". I am not sure about the functionalities of these function modules as i have never used it. Can anyone please help me  by providing some information abt  these FMs. Also i need to do the mapping of parameters of old and new function module. So please provide the details of mapping also. Any pointers on this will be highly appreciated.
    Thanks & Regards,
    P Sharma
    Moderator message : Duplicate post locked.  Read forum rules before posting.
    Edited by: Vinod Kumar on Jul 8, 2011 9:55 AM

    please check the below link.
    http://wiki.sdn.sap.com/wiki/display/ERP6/FMHELP_VALUES_GET_WITH_TABLEobsoleteReplacewith+F4IF_INT_TABLE_VALUE_REQUEST
    Edited by: SAP2011 on Jul 8, 2011 4:17 AM

  • Retrieving of Function Module parameters dynamically

    There is a function module with import and export parameters, I need to pick up the complete structure of the Header Data using a select statement.
    ex: Function Module with import paremeters I1, I2 ..... table parameters t1, t2 .....
    Select from 'Z' table into var .....
    result of this select query is var = 'I1'.
    now there is a macro swc_set_element
    1st parameter = itab
    2nd parameter = var
    now i need to generate 3rd parameter 'I1' dynamically which is an import parameter.
    Edited by: Gaurang Gujar on May 2, 2011 8:04 AM

    Hi.,
    Using Class CL_FB_FUNCTION_UTILITY u can get the Function Module Details.,
    Check this Wiki.,  [Extracting FM details using Class|http://wiki.sdn.sap.com/wiki/display/ABAP/ExtractingFunctionModuleDetailsusingClass-+CL_FB_FUNCTION_UTILITY]
    Also Check these Function Modules:
    FUPARAREF
    FUPARAREF_ENHA " Parameters of Function Modules
    Hope this helps u.,
    Thanks & Regards
    Kiran

  • Function module parameters for L_TO_CREATE_TR

    Hi All,
    Can someone help me out in using the function module 'L_TO_CREATE_TR'.
    What are the necessary import and export parameters along with the table parameters?
    If i want to pass IT_TRITE (table) as export parameters, what are the requisite fields that should be populated inthat table structure?
    Kindly help me out.
    Regards,
    Mainak

    Hi Mainak,
    This is the ABAP and the FM-call:
    data LT_TRITE type L03B_TRITE_T.
    data WA_TRITE like line of LT_TRITE.
    data GV_STORED like VBAPF-QMENGE.
    clear: LT_TRITE, WA_TRITE, GV_STORED.
    refresh LT_TRITE.
    WA_TRITE-TBPOS = GT_LTBP-TBPOS.
    WA_TRITE-ANFME = GT_LTBP-MENGE.
    WA_TRITE-ALTME = GT_LTBP-MEINS.
    WA_TRITE-LETYP = GT_MARA-VHART(3). "3-character storageunittype
    concatenate '000000000000' LTAP-NLENR+10(8) into WA_TRITE-NLENR.
    "FM L_TO_CREATE_TR wants 20 characters
    if GV_DIR = 'N'.
    WA_TRITE-NLTYP = '120'.
    WA_TRITE-NLPLA = 'OVERDRACHT'.
    else.
    WA_TRITE-NLTYP = P_NLTYP.
    WA_TRITE-NLPLA = P_NLPLA.
    endif.
    append WA_TRITE to LT_TRITE.
    TO aanleggen
    clear GT_LTAP_VB.
    refresh GT_LTAP_VB.
    call function 'L_TO_CREATE_TR'
    exporting
    I_LGNUM = GC_LGNUM_011 "LGNUM is '011' in my case
    I_TBNUM = GT_LTBP-TBNUM
    IT_TRITE = LT_TRITE
    importing
    e_tanum = gv_tanum
    tables
    T_LTAP_VB = GT_LTAP_VB
    exceptions
    FOREIGN_LOCK = 1
    QM_RELEVANT = 2
    TR_COMPLETED = 3
    XFELD_WRONG = 4
    LDEST_WRONG = 5
    DRUKZ_WRONG = 6
    TR_WRONG = 7
    SQUIT_FORBIDDEN = 8
    NO_TO_CREATED = 9
    UPDATE_WITHOUT_COMMIT = 10
    NO_AUTHORITY = 11
    PREALLOCATED_STOCK = 12
    PARTIAL_TRANSFER_REQ_FORBIDDEN = 13
    INPUT_ERROR = 14
    others = 15.
    if SY-SUBRC <> 0.
    commit work."See FM L_TO_CREATE_TR docu: commit work is needed
    perform MELDT_DE_FOUT using SY-MSGID SY-MSGTY SY-MSGNO
    SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    else.
    <b>plz reward points if helpful or if it solves ur query.</b>
    Thanks
    Chinmay

  • Issue with the RFC function module - parameters

    Hi,
        When i am creating RFC enabled function module, it was throwing an error like <b>'Reference parameters are not allowed with RFC'.</b>. I am implementing the test scenario to create BAPI, for that i have created table with 2 fields. My main intension is through RFC enabled function module planning to update the ztable.
       When i was creating RFC enabled function module, it was giving error. I remembered that  i need to use new structure when i create RFC enabled function module, so even i created structure also with the same fields of table fields.
       can you please let me know the solution for this.
    Thanks
    jaya

    Hi Ferry,
        Your solution is perfect. can you please explain the below information...
    Call by value                                                                               
    You pass the parameter with values. This means that the parameter     
         contents are copied both when the parameter is passed and when it is  
         transferred back to the calling parameter. For structures that contain
         tables, performance may be reduced considerably. Therefore, you should
         not do this.                                                                               
    I created the parameters with reference to table-fields, what do you mean by 'Call by value'check box usage there.
    Is it mean ...if i change the contents of the field in FM will it pass back to the structure which i refered to this parameter, in this case its table-field.
    Thanks
    jaya

  • Accessing function module parameters dynamically ?

    Hello,
    I´m searching for a possibility to access the parameters of a function module dynamically. I.e. I do not know how many parameters a function has, if it is import/export, or the data type.
    Is there a possibility to access (maybe an ABAP-internal) table with these informations? (At runtime within the function module itself)?
    Thany you for your help,
    best regards,
    Stefan

    Use the function module RPY_FUNCTIONMODULE_READ_NEW to read all of the metadata for a funciton module, it returns internal tables for all parameters of the function module interface.
    Regards,
    RIch Heilman

  • Function module parameters

    using the function module WDY_EXECUTE_IN_PLACE
    to call web dynpro what is the parameter internalmode and  how is it used?
    thanks

    Hi,
    This function module is used to execute the Web Dynpro Application manually. Well, this parameter is used to set the execution type, if the INTERNAL MODE is 'X' then the application executes in SAP GUI itself.If not set, then the application is executed in a browser.
    Hope this helps.
    Regards
    Raja Sekhar

  • Virtual InfoCube with Services - function module parameters documentation ?

    Hello,
    I have been trying to use a Virtual Infocube with Services.
    I have seen most of the posts in SDN, and read the documentation in http://help.sap.com/saphelp_nw04/helpdata/en/8d/2b4e3cb7f4d83ee10000000a114084/frameset.htm
    I did not manage to find a precise description of the import 
    parameters of the Variant 2.
    In particular, what is the meaning of the
    i_tx_rangetab TYPE rsdri_tx_rangetab parameter. I read in the code of RS_BCT_FIGL_DATA_GET that it has to do with query columns. In the tests I did this table is alway empty.
    Also, i_th_sfc gives you the list of characteristics used in the query. But it does not inform you on wether these are in the 'rows' 'free characteristics' or 'filter'. Is there a way of knowing that?
    Claudio Ciardelli

    Hi Claudio,
    I never implemented Virtual InfoCube with services with a FM, but I know there is a couple of How To Documents about named:
    - How to Reporting from External Data via Virtual InfoProvider
    -How to Implement a Virtual InfoCube with Services
    both with some code samples: did you read it?
    Hope it helps
    GFV

  • Function module to lock mulitple objects in a single transport request.

    Hello,
    I have a query regarding one of the requirments in my project. The requirment goes like this:
    ' On executing a transaciton lets say the user gets a list of data elements then the user selects say five data elemetns ( check boxes are there in the list display showing data elements ) and he sets that the documentations of each element as 'Self - Expalanatory' then the requirement is that all these data elements must get locked in a single transport request.
    Is there a standarad API which takes object ID , Object type as input in form of table and checks if there are any existing transports in which the data element is locked if yes locks it under it, if not creates a new one and locks all the other objects in that request.
    Atleast a FM which takes a table of object ids as input and locks them under a single transport request will also be helpful.
    Some place where I can look for it.
    Warm Regards,
    Naveen M

    If the objects are available in an existing request then they will be already locked.
    If they are not available in request you can assign all of them in one request using
    SE03 transaction.
    In SE03 transaction,select include objects in request and execute.
    there click selected objects radiobutton, give your objects and execute.
    save them in a request and they will be locked and you can transport them later.

Maybe you are looking for