cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering the data in BAPI

Former Member
0 Kudos

Hi,

we are using bapi_PRODORDCONF_GETDETAIL to fetch some data in a transaction. For this we have to use a condition that it should display records only from plant 1000. for this I'm trying to use genericfilterandsort action filter the results. But the problem is that when I'm trying to map it to output of repeater or the bapi output, The filter columns are not being displayed. I've tried to link also, but its of no use. I've tried conditional statement too... but din't work either.... can anyone help in this scenario???

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Husain

U should hv to know the usage of Action Blocks in BLS - which Action Block should be used to meet ur requirement.

There is no requirement of Generic And Sort filter to meet ur scenario. This is used to sort the XML Output based on any column u want.

Just pass the parameter of plant to the request of RFC.

Regards

Som

Former Member
0 Kudos

thanks.......but....... that's the catch buddy...we don't have plant as input for rfc and I need to pass the value dynamically......so that the user can input the value and choose it and as far as usage is concerned so FYI we do have and option to filter the XML output in generic sort and filter ...just check the lower area(i'm not sure which version you are using but I'm using 11.5)...the only prob is that bapi doesn't return result in simple XML format....

please answer if you know working answer

jcgood25
Active Contributor
0 Kudos

Musarrat,

The simple answer is that the GenericSortFilter action block expects the Illuminator document xml format (Rowsets/Rowset/Row) and not the arbitrary format returned by your BAPI.

Have you downloaded the PP templates from the SDN download section? <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloads">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloads</a>

These starting point references should give you some insight into how to construct the document format from the BAPI response.

Regards,

Jeremy

Former Member
0 Kudos

Som,

Unfortunately the BAPI mentioned does not have a Plant input param.

Husain,

I am not sure what are you trying to achieve because this BAPI requires a confirmation and a counter to get back the details.

How are you getting the Confirmation numbers ? My guess - Downloading confirmations for an order or may be a range of orders. The orders are associated to a plant and thats where your filter comes into the picture.

Now as to what action / where to use , well as Som mentioned - be clear of your requirements and decide what action's best.

Former Member
0 Kudos

Hi

Thanks for your valuable inputs..... I'm using bapi_PRODORDCONF_GETlist to get the confoirmation number and confirmation counter......passing it on to bapi_PRODORDCONF_GETDETAIL. my requirement is to get the confirmed order details based on plant selection......so I'm trying to filter it out.... i tried condition also... but its just checking for the first record in bapi return....

screwed up

Former Member
0 Kudos

Use the Repeater and then the Conditional

Former Member
0 Kudos

Huh

Well, would any of these 2 ideas help to get ur required result -

1> In the SAP System, with help of ABAP (if u know, otherwise let some ABAPer do)develope a new FM (Function Module) which will call the FM <b>BAPI_PRODORDCONF_GETDETAIL</b> to get required order details on plant selection, where plant selection will be created as an input parameter for that newly developed FM.

Then in BLS, use that new FM as RFC which in turn has a request item as Plant, which will be passed as input parameter and get response from RFC. that will be ur expected result.

2> Just use <b>BAPI_PRODORDCONF_GETDETAIL</b> as RFC in BLS using JCO Interface Action to get the result of all order details. Then loop this result using Action <b>Repeater</b> with item of the table which returns all the details as XPath Target of Repeater (in Configure Object). In this loop, use <b>Conditional</b> Action to check the transaction input parameter (plant) with the plant item in the Repeater, Then use <b>Row</b> Action to append the satisfied items from Repeater to the XML Document (it must be defined initially with required column names to be displayed as output in the BLS)

Regards

Som

Former Member
0 Kudos

I suppose you are going against the GOODSMOVEMENTS table to filter on Plant.

Create a transaction property called 'Plant' and use the following XPath expression in the Repeater->Configure

BAPI_GetProdConfDetail.Response{/BAPI_PRODORDCONF_GETDETAIL/TABLES/GOODSMOVEMENTS/item[PLANT=#Transaction.Plant#]}

John

Former Member
0 Kudos

hi Musarrat,

I think you dont have to use genericFilter Action for this. Instead configure the links for the plant details ie., 1000 to the Request of the BAPI of JCO Action itself .

Regards

Muzammil