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: 

list processing

Former Member
0 Kudos

Hi

i have displayed values using write stmt in a list. Now my problem is that when i click on one of value and there is a pushbutton provided on screen, click on push button the next screen should appear and the selected row should get displayed on next screen

plz help me

Thanks

Parag

4 REPLIES 4

Former Member
0 Kudos

hi.

here is sample code for hot spot.

copy paste it in editor window and execute it.

then enter date. it will show some values in rows.

click on the value in any row and it will show the next screen.

hope it will help u

report  zfsl_hot_cust_docn." NO STANDARD PAGE HEADING LINE-COUNT 100 LINE-SIZE 125.
tables: zsd_credit_bal, tvm4t, t023t, kna1.

types : begin of t_sd_credit_bal,                 " To define Internal Table for holding following Data
          benid like zsd_credit_bal-benid,        " Customer ID
          botcp like zsd_credit_bal-botcp,        " Pack
          audat like zsd_credit_bal-audat,        " Date
          vehno like zsd_credit_bal-vehno,        " Vehicle Number
          vbeln like zsd_credit_bal-vbeln,        " Document Number
          movmt like zsd_credit_bal-movmt,        " Movement type
          quantity like zsd_credit_bal-quantity,  " Quantity
        end of t_sd_credit_bal.

select-options:  soaudat for zsd_credit_bal-audat no-extension obligatory default '20071121'.
*                sobenid FOR zsd_credit_bal-benid NO-EXTENSION NO INTERVALS OBLIGATORY,
*                sobotyp FOR zsd_credit_bal-botyp NO-EXTENSION NO INTERVALS OBLIGATORY,
*                sobotcp FOR zsd_credit_bal-botcp NO-EXTENSION NO INTERVALS OBLIGATORY,
*                soregio FOR zsd_credit_bal-regio NO-EXTENSION NO INTERVALS OBLIGATORY.

data :  sd_credit_bal1 type standard table of t_sd_credit_bal with header line,
        sd_credit_bal2 type standard table of t_sd_credit_bal with header line.


start-of-selection.
  data: vbenid(10), vbotcp(3), lineno type i   ."LIKE LINE OF sd_credit_bal1.
  perform main.


*&---------------------------------------------------------------------*
*&      Form  MAIN
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form main.


  select benid botcp audat vehno vbeln movmt quantity into corresponding fields of table sd_credit_bal1
    from  zsd_credit_bal
    where audat in soaudat.

  write: 'Main Menu'.
  write: / 'Select Entry to see its details.'.

  loop at sd_credit_bal1.
    write: /1 sd_credit_bal1-benid hotspot on, sd_credit_bal1-botcp hotspot on.
    vbenid = sd_credit_bal1-benid.  vbotcp = sd_credit_bal1-botcp.

    hide: vbenid, vbotcp.
  endloop.

endform.                    "main

at line-selection.

  window starting at 25 3 ending at 103 25.

  write: 1(78) sy-uline,
         /1 '|',
         3(10) 'Date' centered,
         14(1)'|',
         16(35) 'Vehicle Number' centered,
         52(1)'|',
         54(10) 'Pack' centered,
         65(1) '|',
         67(10) 'Movm Type',
         78(1) '|',
         /1 '|',
         1(78) sy-uline.

  loop at sd_credit_bal1 where benid = vbenid and botcp = vbotcp.
    write: /1'|',
           3(10) sd_credit_bal1-audat,
           14(1) '|',
           16(35) sd_credit_bal1-benid,
           52(1) '|',
           54(10) sd_credit_bal1-botcp,
           65(1) '|',
           67(10) sd_credit_bal1-movmt,
           78(1) '|',
           /1'|',
           1(78) sy-uline.
  endloop.

Former Member
0 Kudos

Hi,

For your requirement you can use Hide Techinque or Get Cursor Technique.

In current list display you can hide entire work area which can generate next screen by At Line-selection.

Then retrieve the correspodning values from internal table by using Read Statement and you can dispaly on newly generated screen.

If you have pushbuttom then you can write the code under At User-Command.

the follwoing code is one example code but i am not sure you would get the required output or not.

Ex : Loop at it into wa.

Write : / wa-f1,wa-f2,wa-f3.

Hide : wa-f1.

Endloop.

At Line-Selection.

Read table it into wa with key f1 = wa-f1.

write : / wa-f1,wa-f2,wa-f3.

Former Member
0 Kudos

One thing more.

change the TABLES and Fields According to ur need.

awin_prabhu
Active Contributor
0 Kudos

Hi friend,

Use GET CURSOR FIELD concept inside AT LINE-SELECTION.

This will help you.

Thanks..

Edited by: Sap Fan on Feb 18, 2009 3:56 PM