2005 Sep 29 5:28 PM
I am trying to call this BAPI from Visual Basic. The DISPLAY_PARAMETER input is driving me crazy. It has 3 inputs PAGELENGTH, SHOW_PAGE_NUMBER, FORCE REFRESH. I can't work out what data to feed into these fields. If anyone has had success with this BAPI then please could you enlighten me.
Thanks
Owen Williams
2005 Sep 29 10:32 PM
Actually, I think you have to make an entry to the table IT_RANGES.
I tried:
FIELD_NAME S OP LOW_VALUE HIGH_VALUE
SHOW_OPEN_DOCUMENTS I EQ X
The parameters you can use for selection are returned in the table ET_TEMPLATE even when you get the error.
Rob
Message was edited by: Rob Burbank
2005 Sep 29 10:08 PM
Forgot to mention in my original post.
The Return Sructure/table fills and the error data is
Type E
Id IW0_BAPI2
Number 801
Message Enter at least one selection criteria
Hope you can help
Owen
2005 Sep 29 10:32 PM
Actually, I think you have to make an entry to the table IT_RANGES.
I tried:
FIELD_NAME S OP LOW_VALUE HIGH_VALUE
SHOW_OPEN_DOCUMENTS I EQ X
The parameters you can use for selection are returned in the table ET_TEMPLATE even when you get the error.
Rob
Message was edited by: Rob Burbank
2005 Sep 30 3:41 PM
ROB
Thanks mate, that was great
Unfortunately it looks like now i've run into authorization issues. I get VB error telling me I don't have authorization for all the selected objects. When I run BAPI_ALM_ORDER_GET_DETAIL the Components and the Operations Table return OK but the Es_Header comes back Error 0, So I guess it's the same thing (No auth. for Header Data). Do you know any other way of getting Prod order header Data from BAPI's/RFC into VB. I can get Confirmations/Reservations, Planned orders, Sales Orders etc., but this is a stumbling block for me.
Thanks
Owen
2005 Sep 30 3:51 PM
If it's an error being returned from the BAPI, then your basis people should be able to grant you the authorizations you need.
Rob
2005 Sep 30 4:02 PM
I'm a covert operation. The "rather large global cellphone cCompany" that I work for, doesn't want to go near Bapi or RFC development. Everything is IDOC /EDI that takes 6 months to get done. So I'm trying to fly under the radar. If I request auth. I blow my cover. I really appreciate you help though.
Have a good weekend
Owen
2005 Sep 30 4:15 PM
2005 Sep 30 9:24 PM
Rob , i've been investigating this some more and it appears it may not be all Authorizations.
If I fill the It_Ranges table like so
FIELD_NAME S OP LOW_VALUE HIGH_VALUE
OPTIONS_FOR_SALESORG I EQ US01
The Return table says
Type E
Id IH
Number 47
Message No objects were selected
If i change the sales org to "US02" it fails for authorizations. So I am still wondering what I need to put in the DISPLAY_PARAMETERS. It definately needs data adding or it wont run at all. I have just been putting a number in there like 100000000
Any more ideas
2005 Sep 30 9:48 PM
Owen - I think the display parameters are just that. They determine how and how many lines to display. DISPLAY_PARAMETERS-PAGELENGTH controls how many values are returned. I don't know what the others do.
In your selection, if it returns no data, then authorizations won't be an issue. It's only when data is returned that authorizations are checked. Is the error on the sales organization due to you not having authorization to look at that org? Or is it due to not having authorization to view the records. (I.E. What error are you getting?)
Rob
2005 Oct 03 2:56 PM
If I use "BT" as the option and I put in a range of Salesorgs that I know I have no Authorizations for I fails inside visual basic with error " You do not have Authorization for all the selected objects". If I use "EQ" as an option and use a salesorg that I know is good then it makes the call OK but returns no records. However if use "EQ" and put in a salesorg that I know I do not have authorization for it also makes the call OK and returns no records. The Message in the return table is "No objects were selected". Objects not records , so I don't know if this means I'm not asking fir things in the right way or not. The same this happens whatever I put in the "FIELD_NAME parameter.
Owen
2005 Oct 03 3:30 PM
Owen - if you try something like:
FIELD_NAME S OP LOW_VALUE HIGH_VALUE
OPTIONS_FOR_SALESORG E EQ XXXX
and you still get nothing, I'd say it's an authorization issue. Here, you're trying to select records excluding Sales Org. 'XXXX' and so should try to retrieve everything (assuming you don't have a sales org. 'XXXX').
Rob
2005 Oct 03 3:57 PM
If I run as you described it fails inside VB for Authorization. If I put in "US01" and "I" it runs but errors in the return table, with "No objects were selected". I guess that we should let it go , but finally ,Is there a way of running it inside SAP where I could use Transaction SU53 to see what authorizations it checks. I know that I won't have authorization to run it inside SAP but I might know someone who does.
Thanks again for all your effort
2005 Oct 03 4:10 PM