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: 

How to display F1 help in basic report

Former Member
0 Kudos

In basic report, suppose i am displaying a field matnr under the title 'Material'. My requirement is that if the user clicks the material no and presses F1, it should display field information .. How can we do that . Please help me..

Thanking you in advance..

Shankar

7 REPLIES 7

Former Member
0 Kudos

AT SELECTION-SCREEN ON HELP-REQUEST FOR <fieldname>.

Please refer help:

http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm

Regards,

Subramanian V.

Former Member
0 Kudos

Hi Shankar,

I assume that you are having a report with a list output and that you are not using ALV.

Consider the following code:

===================================

data w_test type vbeln value '100'.

write w_test.

===================================

The output is, quite obviously, the value 100. Now, on the list if you position the cursor on this value and click F1, you will get a pop-up with the field help. this is happenning because the data-element VBELN has the documentation maintained, and we are able to see it.

But unlike in the case of a screen output, in the case of lists we cannot program the F1 help for the user-defined fields i.e., if you write a field <b>w_test</b> to the list which has been declared as something like <b> DATA W_TEST TYPE I</b>, you cannot get the F1 help.

If you need the F1 help for the field, the field should be declared with reference to some the data-element that has the required documentation.

Hope the explanation has been clear enough for you. If not, please do get back to me.

Regards,

Anand Mandalika.

0 Kudos

Dear Anand,

Thats Fine .. But can u please tell me Is there any way to display F1 help for the title 'Material' .Right now, i am getting the help only for the material number . Hope u understood my question .

Thank you very much ..

Shankar

0 Kudos

Hi Shankar,

I assume that you want to the same documentation as for Material Number to pop-up when you click on the text Material.

There's a technical possibility in this case. Consider the following code snippet.

=============================================

tables mara.

data: text_matnr type matnr value 'Material',

text_mtart type mtart value 'Type',

text_matkl type matkl value 'Group'.

start-of-selection.

write: /5 text_matnr,

15 text_mtart,

25 text_matkl.

skip.

select *

from mara

up to 25 rows.

write: /5 mara-matnr,

15 mara-mtart,

25 mara-matkl.

endselect.

==============================================

The above code will give you a list of around 25 materials with the Material Type and Material Group of each. It also gives you a heading for all these values at the top of the column. Now, even when you click F1 on the text "Material" or "Type" or "Group", you will get the corresponding documentation.

Please note that it is not at all an elegant way of meeting the requirement. But I don't think there's any other way, as long as you want to stick to the standard list display.

Hope this information will help you meet your requirement, what if in a clumsy way.

Regards,

Anand Mandalika.

P.S. : Please note that in the above example, you cannot give the text for the second column (Type) as anything else of more than 4 characters due to its data type. In case you want to display something like "Material Type", you will have to have to split this heading into multiple fields, each of type MTART (each of them has a length of only 4 characters) and write the heading accordingly.

0 Kudos

Hi Shankar

At list screens, as far as I know, F1 functionality is out of our control. That's whay, I would recommend you to use interactive list processing (i.e. AT LINE-SELECTION) or to insert your own function button at the GUI status to show the required information with respect to the cursor field when it is pressed.

*--Serdar

0 Kudos

All of you, thank you very much for spending time for solving my problem and aqlso for your valuable suggestions .

0 Kudos

Hi Shankar,

Now that your problem is solved, you might consider rewarding the points to the answers according to the extent you have found them to be helpful.

Regards,

Anand Mandalika.

P.S: This also applies to your other query on the AT NEW statement.