‎2007 Oct 01 8:57 PM
Hello Gurus.
I am writing a program which displays the list of sales org and the status of the material (obsoleted or active) by giving the material name in the selection screen.
Now the program displays a list of 3 columns - material, sales org, material status.
<b>Now if I select one of the row, then a particular tcode (CO09) screen should appear with the data taken from the line selection and some other default data required for the tcode.</b>
Can someone help me out to write the code for the bold part.
Thanks in advance.
Regards,
Balu
‎2007 Oct 01 9:30 PM
Hi,
Use Hide statement only in specific conditions..
LOOP AT it_mara.
IF it_mara-mtart = '1234'.
Hide only in specific conditions..
HIDE it_mara-matnr.
ENDIF.
ENDLOOP.
Thanks
Naren
‎2007 Oct 01 9:10 PM
May be something like this:
report test.
data: ivbak type table of vbak with header line.
data : cursor_field(30),
field_value(30) .
select-options: s_vbeln for ivbak-vbeln.
start-of-selection.
select * into corresponding fields of table ivbak
from vbak
where vbeln in s_vbeln.
loop at ivbak.
format hotspot on.
write:/ ivbak-vbeln.
hide ivbak-vbeln.
format hotspot off.
endloop.
at line-selection.
set parameter id 'AUN' field ivbak-vbeln.
call transaction 'VA03' and skip first screen.Sri
‎2007 Oct 01 9:28 PM
Thanks Sri...
Assigned points.
I have one more question. In the first I get an output of material, sales org and material status.
Is there a way that I proceed to line selection and go to tcode only if the material status is a specific value.
Regards,
Balu.
‎2007 Oct 01 9:32 PM
Try this:
report test.
data: ivbak type table of vbak with header line.
data : cursor_field(30),
field_value(30) .
select-options: s_vbeln for ivbak-vbeln.
start-of-selection.
select * into corresponding fields of table ivbak
from vbak
where vbeln in s_vbeln.
loop at ivbak.
format hotspot on.
write:/ ivbak-vbeln.
hide ivbak-vbeln.
format hotspot off.
endloop.
at line-selection.
Cond to check if material status is a particular value
GET CURSOR FIELD field1. "Use GET CURSOR
CHECK field1(4) EQ 'JTAB'. "CHECK HERE
set parameter id 'AUN' field ivbak-vbeln.
call transaction 'VA03' and skip first screen.
Sri
‎2007 Oct 01 9:40 PM
‎2007 Oct 01 9:42 PM
‎2007 Oct 01 9:30 PM
Hi,
Use Hide statement only in specific conditions..
LOOP AT it_mara.
IF it_mara-mtart = '1234'.
Hide only in specific conditions..
HIDE it_mara-matnr.
ENDIF.
ENDLOOP.
Thanks
Naren
‎2007 Oct 01 9:34 PM
‎2007 Oct 01 9:40 PM
Start with:
REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
TABLES marc.
START-OF-SELECTION.
SELECT * FROM marc UP TO 10 ROWS.
WRITE: /001 marc-matnr, marc-werks.
HIDE : marc-matnr, marc-werks.
ENDSELECT.
AT LINE-SELECTION.
SET PARAMETER ID 'MAR' FIELD marc-matnr.
SET PARAMETER ID 'WRK' FIELD marc-werks.
CALL TRANSACTION 'CO09' AND SKIP FIRST SCREEN.Rob