ALV - stack sequence - intriguing problem!

Question: My ALV grid uses two sequential drilldowns - e.g. summary (A) -> detail (B) -> SAP transaction (C).

I'd like to be able to drilldown and return sequentially up and down the stack i.e. A -> B -> C -> B -> A -> B -> C -> B -> A -> B -> C etc

This all works correctly...

However, if I drilldown to level C then back to A then back to C n-times, I have to press BACK n-times before leaving C…

I have worked-round this problem by directly calling the screen that B sits on (SET SCREEN '0100'. LEAVE SCREEN.) after drilldown C… But I wouldn't mind the proper solution!

Code:-

CREATE OBJECT g_custom_container1
EXPORTING container_name = g_container1.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container1.

CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_save = 'A'
i_structure_name = 'ZIAS0002'
is_layout = alv_layout
CHANGING
it_fieldcatalog = alv_fieldcat[]
it_sort = alv_sort[]
it_outtab = tab_drilldown.

CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_hotspot_click_dd FOR grid1.

…and…

METHOD handle_hotspot_click_dd.

READ TABLE tab_drilldown INDEX e_row_id INTO wa_drilldown.
CHECK sy-subrc = 0.
PERFORM do_fs10n. "<- CALL TRANSACTION FS10N.

ENDMETHOD. "handle_hotspot_click_dd


Vers: Enterprise

Any help greatly appreciated!!!

Ps
I DID search first… (There's a lot of ALV questions, but not this specific problem!)
_________________
The Doc
Magna Grand Docot of the Tuly Idiot Order

2007 Basic Rules

Answer:
I can tell no one likes to code ALV!!!
_________________
The Doc
Magna Grand Docot of the Tuly Idiot Order

2007 Basic Rules

Answer:
Let me get this right.

You push A B C on the stack.

You pop C B A off the stack.

C Should never be on the stack because it's the last screen called.

How can you drill down to C multiple times without popping C And B off the stack to get back to A ??

You end up with:

1: Push A B
1: Pop B A
2: Push A B
2: Pop C B A
3: Push A B
3: Pop C C B A

Is that right ???

Are you using Call Screens in all cases ??
_________________
Regards

R


Abap KC
SFMDR

Answer:
I had done something similar but it took me 30 minutes to dig and find it.

In subroutine AT_USER_COMMAND, set this variable before calling your new ALV list or grid. This will kill any previous levels.

p_selfield-exit = 'X'. " Kill previous ALV Grid output

Hope it works in your case.

Answer:
R:

I am using CALL SCREEN to call A and B, and CALL TRANSACTION for the transaction.

A is summary report with drilldown to...
B is detail report with drilldown to...
SAP transaction (FS10N)

Problem is: when I have drilled down to the transaction, then pressed BACK to return to B then BACK again to return to A, then drilled down to transaction again, I have to press BACK twice to leave transaction to B then again to get back to A. Then, if I start drilling down again, I have to press BACK three times to leave transaction (then 4 and 5 etc).

Something isn't being cleared somewhere! I tried sy-lsind, but that is always 0.


mrajappan:
Sounds promising! But what is "p_selfield-exit"... Where do I find that? I didn't think AT USER-COMMAND was called in ALV??? (Or have I got the wrong head on today?)

Thanks for all your help
_________________
The Doc
Magna Grand Docot of the Tuly Idiot Order

2007 Basic Rules
Copyright ?2007 - 2008 www.jt77.com