Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

possible to change output of searchhelp with exit

former_member186143
Active Contributor
0 Kudos
389

I was wondering if it is possible that in the exit of a searchhelp or in an other way if you can change the color of the rows depending on certain values ?

so if a vendor is blocked for instance that the row wil be made red, and otherwise the default color

kind regards

arthur de smidt

10 REPLIES 10

brad_bohn
Active Contributor
0 Kudos
132

Yes, you can use the step 'DISP' to bypass the standard dialog selection and display process and then send back the value selected to the calling screen. You will be designing your own screen(s) though and not modifying the standard screens.

0 Kudos
132

Yep I know that but to which field and structure can I pass the color ?

in DDFIELDS-> DFIES I can change the outputlen for instance but that's it

kind regards

arthur

brad_bohn
Active Contributor
0 Kudos
132

I'm not sure I understand. If you overtake the selection and display with your own screens, there's no need to pass a color, you have complete control over the display attributes as you would with any custom screen. I would use some other indicator though, such as a red light/green light column, or something to that effect. Then, you just need to handle the selection process and return control to the search help.

0 Kudos
132

>

> I'm not sure I understand. If you overtake the selection and display with your own screens, there's no need to pass a color, you have complete control over the display attributes as you would with any custom screen. I would use some other indicator though, such as a red light/green light column, or something to that effect. Then, you just need to handle the selection process and return control to the search help.

hmmm that might help to provide an icon in the output.

smart Idea , I will try it out ASAP

kind regards

arthur

uygur_burak
Active Contributor
0 Kudos
132

Hello Arthur,

You can use enhancement for this operation.

In INCLUDE LSDH4F09

After (PERFORM create_packages CHANGING list_control.) line, in form INIT_CONTROL, you can create enhancement and change the search help output values .

Regards,

Burak

0 Kudos
132

You didn't answer the question though. How do you expect him to affect the screen line color for individual entries that way? You can't do it that way and you certainly don't need a 'hack' like that to change output attributes and values, when SAP already provides the functionality via the call control exits.

Personally, I would not go to the extent of overtaking the display and selection anyway with customer screens. I would use the search help exit code to add an extra column to the output with an appropriate header that 'flags' the blocked items and/or use the exit to sort them to the top or bottom of the list.

former_member186143
Active Contributor
0 Kudos
132

I have tried a different method where I made a new datatype and a new domain which converts the output from an xfeld to an traffic light.

in the domain ZXFELD_ICON

I have input char 1 and output char 4

I made 2 conversion routines for the exit routine

CONVERSION_EXIT_ZXFEL_OUTPUT

and transformed the data in here

if input = ' '.

select single id from icon

into output

where name = 'ICON_GREEN_LIGHT'.

else.

select single id from icon

into output

where name = 'ICON_RED_LIGHT'.

endif.

0 Kudos
132

That's an even slicker solution that just using the column with the 'X' and even better than a custom screen. I never thought of using a conversion exit on the new column. Nice!

0 Kudos
132

>

> That's an even slicker solution that just using the column with the 'X' and even better than a custom screen. I never thought of using a conversion exit on the new column. Nice!

thanks to a debugging course I had at sapteched I remembered 1 horrible piece of coding that was so utterly small and simple but still came with a weird output. nobody found it ofcourse but finally it was done in the conversion exit of the domain that a whole letter was generated as output. I had to think of that debugging session again and tried it in this situation and it works nice

kind regards

arthur

0 Kudos
132

Hi,

Nice solution, however isn't it simpler to add the icon value in the searchhelp exit function module (for example when displaying)?

Then you don't need conversion exit function modules...

Jeroen.