Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

detail list and actual

hi all,

i am working with lists,

i hav basic list and detail list, in basic list i have 4 fields and in basic list i hav 3 fields so how can i display th e detail list pls help me out when i display it displays the basic list so how can i display the detail list pls help me out and this is my code.

hi all,

i am working with lists,

i hav basic list and detail list, in basic list i have 4 fields and in basic list i hav 3 fields so how can i display th e detail list pls help me out when i display it displays the basic list so how can i display the detail list pls help me out and this is my code.

tables: spfli,sflight.

types: BEGIN OF stab,

carrid like spfli-carrid,

connid like spfli-connid,

airpfrom like spfli-airpfrom,

airpto like spfli-airpto,

deptime like spfli-deptime,

end of stab.

data: i_spfli type STANDARD TABLE OF stab.

data: wa_spfli like line of i_spfli.

types: begin of s_flight,

fldate like sflight-fldate,

seatsmax like sflight-seatsmax,

seatsocc like sflight-seatsocc,

end of s_flight.

data: i_sflight type STANDARD TABLE OF s_flight.

data: wa_sflight like line of i_sflight.

  • endselect.

  • endif.

START-OF-SELECTION.

select carrid

connid

airpfrom

airpto

deptime

from spfli into CORRESPONDING FIELDS OF TABLE i_spfli.

  • endselect.

loop at i_spfli into wa_spfli.

write: /

wa_spfli-carrid,

wa_spfli-connid,

wa_spfli-airpfrom,

wa_spfli-airpto,

wa_spfli-deptime.

endloop.

HIDE: wa_spfli-carrid,

wa_spfli-connid.

at LINE-SELECTION.

*

if sy-lsind = 1.

write: text-001,

wa_spfli-carrid,

wa_spfli-connid.

select fldate seatsmax seatsocc from sflight

into CORRESPONDING FIELDS OF TABLE i_sflight

where carrid = wa_spfli-carrid and

connid = wa_spfli-connid.

WRITE: / wa_sflight-fldate,

wa_sflight-seatsmax,

wa_sflight-seatsocc.

endif.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question