2011 Mar 04 8:25 AM
Hi everyone,
First of all, i have already been looking for hours how to solve this issue through sdn, google,... but i couldnt find any answer.
I will describe you the scenario. I have a report with some select options in the selection screen. Some of them had come allong automatically with a matchcode help, with some others i had to force them by adding the matchcode object in the declaration.
But the problem comes with one of the select-options refered to field EKKO-BSART. This field has help search H_T161.
SELECT-OPTIONS: s_bsart FOR v_bsart matchcode object H_T161.
In fact, it shows the match code providing BSTYP, BSARTand BATXT. But when i choose one of the rows, the value selected is BSTYP. I NEED BSART VALUE.
I have looked in SE16 table EKKO, and the matchcode for field BSART works perfectly.
How can i get BSART value? I am sure that there is a standard search help for this field that works, but i cant find it out.
I dont want to use any custom function, i want standard help search.
Thanks in advance,
Chema Traveso
2011 Mar 04 9:18 AM
WOW
I didnt expect you to reply so soon, THANKS
Right now i cant try the solutions you propose, but this evening i will check them.
Anyway, my requirement is to show all the purchasing docs availabe (purchase requisition, purchase order..) not fiiltering by type.
Just a question: whats the real difference between this two declaration ?
data v_bsart type ekko-bsart.
or
data v_bsart type bsart.
Regards,
Chema Traveso
2011 Mar 04 8:39 AM
Hi
I checked my system for standard search helps, there are 4 available,
/ISDFPS/T161_B Purchase Requisition Types
FMBLEXT_F4_DOCTYPE_MM Doc Type for Purchasing
H_T161 Generated Help View for Check Table T161
WAUF_T161 Find order types for order category 'F'
Out of these the 2nd and 3rd are returning BSTYP as mentioned and not BSART, because of the way it is created.
But the other two i.e. 1st and 4th will return the BSART but they are restricted based on BSTYP,
1st Option - BSTYP = 'B' (Purchase requisition)
4th Option - BSTYP = 'F' (Purchase order)
Check if the 1st and 4th option fits your requirement, in case you want only specific to B and F.
Also, if you see for EKKO while viewing the entries, the F4 even if you choose value for BSART it will return BSTYP as well.
So, in your program if you have both the fields then it make sense to use 2nd and 3rd search helps.
Regards
Ranganath
2011 Mar 04 8:46 AM
Hi,
Just declare the select options. (Iam able to display F4 without giving the matchcode)
SELECT-OPTIONS: s_bsart FOR v_bsart .
Now pressing F4 gives you the values and selecting one gives you the Bsart value.
Regards,
Srini.
2011 Mar 04 8:50 AM
Yes i agree to this. Just make sure you declare the V_BSART as below,
data v_bsart type ekko-bsart.
And not as
data v_bsart type bsart.
It is working this way as well.
Regards
Ranganath
2011 Mar 04 9:18 AM
WOW
I didnt expect you to reply so soon, THANKS
Right now i cant try the solutions you propose, but this evening i will check them.
Anyway, my requirement is to show all the purchasing docs availabe (purchase requisition, purchase order..) not fiiltering by type.
Just a question: whats the real difference between this two declaration ?
data v_bsart type ekko-bsart.
or
data v_bsart type bsart.
Regards,
Chema Traveso
2011 Mar 04 9:25 AM
There is no such different in terms of the data element properties. If you had the search help assigned at the Data element level then the statement data v_bsart type bsart. will be good enough to get the search help.
But in your case it is assigned at the table field level, hence we need the declaration data v_bsart type ekko-bsart.
Regards
Ranganath
2011 Mar 04 9:34 AM
That makes sense.
I´ll try this evening and see if it worked out.
Regards,
Chema Traveso
2011 Mar 06 5:24 PM
Good evening,
I already tryed your solution but it is still not working.
I declared data v_bsart type ekko-bsart and doesnt get the f4 help.
I also forced it by adding the matchcode object H_T161 and is still returning the bstyp field. I need bsart
Please, any help on this...
Regards,
Chema
2011 Mar 06 5:31 PM
Its working,
sorry abaut my previous reply. Your solution is actually working.
Thank you very for you answers.
Regards,
Chema