on 2011 Feb 23 3:03 PM
Hi @ all,
i would like to use the new sap nco 3.0 to call bapis from a .net enviroment.
i used the tutorials, which are provided by sap, but there are not all posibilities covered, like call a bapi with parameters within a table.
i want to call for eg. BAPI_FUNCLOC_GETLIST with table parameters like FUNCLOC_RA -> SIGN: I, OPTION: BT, LOW: 1, HIGH: 5000 and i expect based on this call with the parameters to get the Structure FUNCLOC_LIST where i will get the desired function locations.
So i don't know how to pass the parameters. I didn't find anything suitable for me ether on SDN,SCN or elsewhere.
Hopefully i can get some help here.
Thank you in advance
Best regards
R. Henschel
Request clarification before answering.
... i got it, at least for this case ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code example for FUNCTION: BAPI_ALM_ORDERHEAD_GET_LIST
Dim API As IRfcFunction = ecc.Repository.CreateFunction("BAPIALM_ORDERHEAD_GET_LIST")
'
Dim myStructure As IRfcStructure = ecc.Repository.GetStructureMetadata("BAPIALM_ORDER_LISTHEAD_RANGES").CreateStructure
myStructure.SetValue("FIELD_NAME", "OPTIONS_FOR_DOC_TYPE")
myStructure.SetValue("OPTION", "EQ")
myStructure.SetValue("LOW_VALUE", "ZM01")
'
Dim myTable As IRfcTable = API.GetTable("IT_RANGES")
myTable.Append(myStructure)
API.SetValue("IT_RANGES", myTable)
API.Invoke(_ecc)
Hope this helps.
. . .
IRfcFunction FuncLocBAPI_GETLIST = repo.CreateFunction("BAPI_FUNCLOC_GETLIST");
FuncLocBAPI_GETLIST.Invoke(prd);
IRfcStructure returnStructure = FuncLocBAPI_GETLIST.GetStructure("RETURN");
string returnCode = returnStructure.GetString("TYPE");
if (returnCode.Equals("E") || returnCode.Equals("A"))
{
throw new Exception(returnStructure.GetString("MESSAGE"));
}
The result of this code is a message with the content: "Specify at least one selection condition".
Do somebody know how can i pass some parameters to the BAPI Call to get the right results, in this case a Tabel with the List of Functional Locations.
Thanks everyone in advance for oyur help.
BR
Rudolf
Edited by: Rudolf Henschel on Feb 25, 2011 2:09 PM
Edited by: Rudolf Henschel on Feb 25, 2011 2:11 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.. i tried almost everything, but without success. i don't know how to pass parameters to get the Table FUNCLOC_RA (pre)filled so that i can get the result table FUNCLOC_LIST.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.. is there nobody who could provide some ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.