Application Development and Automation 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: 
Read only

regarding sap query

Former Member
0 Likes
860

Hi All

I have one sap query which displays output in ALV format, i want to add one dynamic subroutine into it as following :

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

ENDFORM.

So can i add it directly to the query ??.. If not plaese tell me how would i insert this subroutine??

Thnx.

Hi All

I have one sap query which displays output in ALV format, i want to add one dynamic subroutine into it as following :

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

ENDFORM.

So can i add it directly to the query ??.. If not plaese tell me how would i insert this subroutine??

Thnx.

6 REPLIES 6
Read only

praveen_hannu
Contributor
0 Likes
811

Hi

Wht type of query you are using, if you built your query using SAP Quick viewer through the t-code SQVI you cant make any changes in it.

If you would have created the infoset query, you can make the changes in the infoset developement through the SQ02, in the code tab. There you can write what ever you want.

Thanks

Praveen

Read only

0 Likes
811

Hi,

Thnx for your reply.

Query is designed through Quick Viewer. When i am doing changes in the same and inserting subroutine it is giving me some error as : The type 'SLIS_ SELFIELD' is unknown...can you tell me what necessary changes i have to make .

I have added subroutine as follows : Please tell me what necessary changes i have to do in it so that it'll suit to query.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&IC1'. "doubleclick

READ TABLE G00 INDEX rs_selfield-tabindex.

IF sy-subrc = 0.

IF rs_selfield-fieldname EQ 'JHAK-AVM_NR'

AND NOT rs_selfield-value IS INITIAL .

SET PARAMETER ID 'JHA' FIELD rs_selfield-value.

CALL TRANSACTION 'JHA3N' AND SKIP FIRST SCREEN.

ELSE.

SET PARAMETER ID 'JHA' FIELD G00-jhak-avm_nr.

CALL TRANSACTION 'JHA3N' AND SKIP FIRST SCREEN.

ENDIF.

ENDIF.

CLEAR r_ucomm.

ENDCASE.

ENDFORM.

Read only

praveen_hannu
Contributor
0 Likes
811

HI

You need to define the type-pools : slis. in the data defination section.

As you are using the SLIS_SELFIELD structure, its part of types SLIS, you need mention it. Then only the structure will refer from that type-pools. Try with this, I hope it resolves the issue.

Thanks

Praveen

Read only

0 Likes
811

Hi,

Now i am not getting any errors but the effect of that subroutine is not reflecting in the output. When i am doing double click on that order, according to the logic of subroutine it should call the transaction JHA3N but it is not happening.

Can you please tell me the reason?...are there any settings for query which i have to make in some other transactions?

Thnx.

Read only

0 Likes
811

In SQ01 menu bar select Goto there is a report assignment . Here you can assign Tcode which should be called when a line in the report output is double clicked.

Read only

0 Likes
811

Hi,

Actually it is not the query but modified Zreport of the query report AQL4BD==========BOUNCED_CNTRS= and in that i need to make the changes for the desired output..

Thnx.