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

No output!!!

Former Member
0 Likes
1,206

Hi forum, I'm not getting output in this program..kindly help me out...

Report test no standard page heading line-count 65(3) line-size 150.

tables : mara, marc, mard, makt, lfa1, lfb1, lfbk, vbak, vbap, vbrp, lips.

data : begin of itab1 occurs 0,

lifnr like lfa1-lifnr,

end of itab1.

data : begin of itab2 occurs 0,

matnr like marc-matnr,

werks like marc-werks,

end of itab2.

selection-screen: begin of block b1 WITH FRAME TITLE text-001.

select-options :

s_lifnr for lfa1-lifnr modif id s1.

selection-screen end of block b1 .

selection-screen: begin of block b2 WITH FRAME TITLE text-002.

parameters : s_matnr type marc-matnr modif id s2.

  • werks type marc-werks modif id s3.

selection-screen end of block b2.

selection-screen: begin of block b3 WITH FRAME TITLE text-003.

parameters : s_posnr like vbap-posnr modif id s3.

selection-screen end of block b3.

selection-screen: begin of block b4 WITH FRAME TITLE text-004.

parameters : R1 radiobutton group rad1,

R2 radiobutton group rad1.

  • R3 radiobutton group rad1.

selection-screen end of block b4.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

elseif SCREEN-GROUP1 EQ 'S3'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

elseif SCREEN-GROUP1 EQ 'S3'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

*IF R3 EQ 'X' AND SCREEN-GROUP2 EQ 'S1'.

*SCREEN-INPUT = 0.

*MODIFY SCREEN.

*elseif SCREEN-GROUP1 EQ 'S2'.

  • SCREEN-INPUT = 0.

*MODIFY SCREEN.

*ENDIF.

ENDLOOP.

at selection-screen.

if r1 = 'x'.

select lifnr from lfa1 into corresponding fields of table itab1 where lifnr in s_lifnr.

loop at itab1.

write : / itab1-lifnr.

endloop.

endif.

  • if r2 = 'x'.

  • select matnr werks from marc into corresponding fields of table itab2 where matnr in s_matnr.

  • loop at itab2.

  • write : / itab2-matnr.

  • endloop.

  • endif.

Hi forum, I'm not getting output in this program..kindly help me out...

Report test no standard page heading line-count 65(3) line-size 150.

tables : mara, marc, mard, makt, lfa1, lfb1, lfbk, vbak, vbap, vbrp, lips.

data : begin of itab1 occurs 0,

lifnr like lfa1-lifnr,

end of itab1.

data : begin of itab2 occurs 0,

matnr like marc-matnr,

werks like marc-werks,

end of itab2.

selection-screen: begin of block b1 WITH FRAME TITLE text-001.

select-options :

s_lifnr for lfa1-lifnr modif id s1.

selection-screen end of block b1 .

selection-screen: begin of block b2 WITH FRAME TITLE text-002.

parameters : s_matnr type marc-matnr modif id s2.

  • werks type marc-werks modif id s3.

selection-screen end of block b2.

selection-screen: begin of block b3 WITH FRAME TITLE text-003.

parameters : s_posnr like vbap-posnr modif id s3.

selection-screen end of block b3.

selection-screen: begin of block b4 WITH FRAME TITLE text-004.

parameters : R1 radiobutton group rad1,

R2 radiobutton group rad1.

  • R3 radiobutton group rad1.

selection-screen end of block b4.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

elseif SCREEN-GROUP1 EQ 'S3'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

elseif SCREEN-GROUP1 EQ 'S3'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

*IF R3 EQ 'X' AND SCREEN-GROUP2 EQ 'S1'.

*SCREEN-INPUT = 0.

*MODIFY SCREEN.

*elseif SCREEN-GROUP1 EQ 'S2'.

  • SCREEN-INPUT = 0.

*MODIFY SCREEN.

*ENDIF.

ENDLOOP.

at selection-screen.

if r1 = 'x'.

select lifnr from lfa1 into corresponding fields of table itab1 where lifnr in s_lifnr.

loop at itab1.

write : / itab1-lifnr.

endloop.

endif.

  • if r2 = 'x'.

  • select matnr werks from marc into corresponding fields of table itab2 where matnr in s_matnr.

  • loop at itab2.

  • write : / itab2-matnr.

  • endloop.

  • endif.

12 REPLIES 12
Read only

Former Member
0 Likes
1,175

Hi,

If you use Parameter as select-option then you have to use Equal operator in the select query.

Please change your select query .that qill solve your problem.

select matnr werks from marc into corresponding fields of table itab2 where matnr eq s_matnr.

Thank you..

Thanks,

Chanrda.

Read only

Former Member
0 Likes
1,175

Hi Mahathi,

I don't see Start-of-selection or the output logic in the program... Please explain what this program is actually supposed to do...

-Muktar

Read only

Former Member
0 Likes
1,175

Hi

keep a break point at itab1 or itab2 and check whether it is having some value .

or

try this.

DATA : wa_itab1 type itab1 or

wa_itab1 like line of itab1.

loop at itab1 into wa_itab1.

write wa_itab1-matnr.

endloop.

reward if helpful.

Ramya

Read only

Former Member
0 Likes
1,175

Hi,

U have 2 changes to do.

1. put EQ or = in place of IN in the Select Statement.

2. Change X in if conditions to capitals.

Awrd Points If Useful

Bhupal

Read only

Former Member
0 Likes
1,175

instead of ...

at selection-screen.

if r1 = 'x'.

select lifnr from lfa1 into corresponding fields of table itab1 where lifnr in s_lifnr.

loop at itab1.

write : / itab1-lifnr.

endloop.

endif.

give ...

capital 'x'

start-of-selection.

if r1 = 'X'.

select lifnr from lfa1 into corresponding fields of table itab1 where lifnr in s_lifnr.

loop at itab1.

write : / itab1-lifnr.

endloop.

endif.

Read only

0 Likes
1,175

Hi Thanks to all..

But nothing has solved my problem

My program description is as follows:

I've two radio buttons : r1, r2.

If i select r1 only vendor list should enable in the input selection screen.

if i select r2 only material list should enable in the selection screen.

upon the execution i should display vendor numbers if i click r1 else material numbers if i click r2.

Thanks,

Mahathi

Read only

Former Member
0 Likes
1,175

Hi Mahati,

Move ur code from At Selection-Screen into Start-of-Selection.

How can u write a write statement at 'At Selection-Screen'.

Awrd POints if useful

Bhupal

Read only

0 Likes
1,175

Hi,

Thanks Bhupal...

Could u pls alter the code and send...

Plsssssssssssssssssssssssss

Regards,

Mahathi

Read only

Former Member
0 Likes
1,175

Just Replace AT SELECTION-SCREEN with START-OF-SELECTION.

Awrd POints if useful

Bhupal

Read only

0 Likes
1,175

ya i did that...but i couldnt get the output..

thanks

mahathi

Read only

0 Likes
1,175

Hi,

try this....

Start-of-selection.

IF r1 = 'X'.

SELECT lifnr FROM lfa1 INTO CORRESPONDING FIELDS OF TABLE itab1 WHERE lifnr IN s_lifnr.

LOOP AT itab1.

WRITE : / itab1-lifnr.

ENDLOOP.

ENDIF.

IF r2 = 'X'.

SELECT matnr werks FROM marc INTO CORRESPONDING FIELDS OF TABLE itab2 WHERE matnr = s_matnr.

LOOP AT itab2.

WRITE : / itab2-matnr.

ENDLOOP.

ENDIF.

-Muktar

Read only

0 Likes
1,175

Hi,

Change the code like below:

  • Selection Screen for Input Interface

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: pa_lifnr TYPE lfa1-lifnr MODIF ID abc,

pa_vkorg TYPE vbak-vkorg MODIF ID abc.

SELECTION-SCREEN END OF BLOCK b1.

  • Selection Screen for Reprocessing

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

SELECT-OPTIONS: s_matnr FOR marc-matnr MODIF ID def,

s_wers FOR marc-werks MODIF ID def.

SELECTION-SCREEN END OF BLOCK b2.

  • Selection screen for Processing Options

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

At Selection-screen output.

IF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-group1 = 'ABC'.

screen-input = 0.

ELSEIF screen-group1 ='DEF'.

screen-active = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_upd EQ gc_x.

*For Reprocessing

LOOP AT SCREEN.

IF screen-group1 = 'DEF'.

screen-input = '0'.

ELSEIF screen-group1 = 'ABC'.

screen-active = '1'.

ENDIF.

MODIFY SCREEN.

CLEAR pa_upd.

ENDLOOP.

ENDIF.

Start-of-selection.

Selection of the data for conditions

if pa_rep eq 'X'.

select lifnr

else.

select matnr

endif.

Regards

kannaiah