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: 

Problem with at user command

former_member383741
Participant
0 Kudos
171

Hi,

In the output screen iam having one field itab-ucomm which is in edit mode, based on which values for 10 other fields should change.

Note: I am doing this report in normal write statement.

For eg:

I am having 5 fields in ouput.

Field1, Field2,Field3,Field4,Field5.

and itab-ucomm which is in edit mode, if the user enters the value 10 and press enter

values of all other fields should be: Field110, Field210.........Field5+10.

All this shud trigger in output screen

Please advice,

K.Karthikeyan.

Edited by: Karthikeyan Krishnan on Feb 28, 2009 11:41 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos
133

test the following code

REPORT ztn_test .

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

SELECTION-SCREEN COMMENT 1(35) text1.
PARAMETERS: field1 type i.
PARAMETERS: field2 type i.
PARAMETERS: field3 type i.
PARAMETERS: field4 type i.
PARAMETERS: field5 type i.
PARAMETERS: pucomm TYPE i. " U can change this field from itab value or according to ur desire


SELECTION-SCREEN END OF BLOCK a.

INITIALIZATION.
  text1 = 'Please Enter the values'.

AT SELECTION-SCREEN OUTPUT.

  IF field1 IS INITIAL.
    field1 = ''.
    field2 = ''.
    field3 = ''.
    field4 = ''.
    field5 = ''.
    pucomm = ''.

  ELSE.
    field1 = field1 + pucomm.
    field2 = field2 + pucomm.
    field3 = field3 + pucomm.
    field4 = field4 + pucomm.
    field5 = field5 + pucomm.


  ENDIF.

9 REPLIES 9

Former Member
0 Kudos
134

test the following code

REPORT ztn_test .

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

SELECTION-SCREEN COMMENT 1(35) text1.
PARAMETERS: field1 type i.
PARAMETERS: field2 type i.
PARAMETERS: field3 type i.
PARAMETERS: field4 type i.
PARAMETERS: field5 type i.
PARAMETERS: pucomm TYPE i. " U can change this field from itab value or according to ur desire


SELECTION-SCREEN END OF BLOCK a.

INITIALIZATION.
  text1 = 'Please Enter the values'.

AT SELECTION-SCREEN OUTPUT.

  IF field1 IS INITIAL.
    field1 = ''.
    field2 = ''.
    field3 = ''.
    field4 = ''.
    field5 = ''.
    pucomm = ''.

  ELSE.
    field1 = field1 + pucomm.
    field2 = field2 + pucomm.
    field3 = field3 + pucomm.
    field4 = field4 + pucomm.
    field5 = field5 + pucomm.


  ENDIF.

0 Kudos
133

Hi Tahir,

Thanks for your responce, but it does'nt meet my requirement as I cannot use parameter in selection screen. I need to display field in out put with edit mode and if the user enters a value in it and press enter the sum should appear on the other field.

Please advice

0 Kudos
133

Hi.

Please tell me ur requirement more clearly.

Are u saying that output screen have one field in which when user write a value and press enter then

this value should be added to all other 5 fields. iz it? if yes then where are u getting these five fields.

plz make it clear.

thnx.

0 Kudos
133

Hi,

your exactly correct.i am getting these fields in table only.doing some calculation based on that value.In the final output screen itab-quan which is in edit mode. if the user change itab-quan other field also change in the output screen itself.

for ex.

this is the output screen.

itab-quan = 10 which is in edit mode.

field1 = 20.

field2 =30.

field3 =40.

field4=50.

field5 =60.

if the user change the itab-quan = 20.

itab-quan = 20 is added to the other five fields.

the output become like this.

itab-quan = 20.

field1 = 40.

field2 =50.

field3 =60.

field4=70.

field5 =80.

NOTE: All shoud change in output screen itself.

can you help me.

Regards,

K.Karthikeyan.

Edited by: Karthikeyan Krishnan on Mar 2, 2009 9:48 AM

0 Kudos
133

Hi,

Please Test the following Sample Code it is working fine and will solve out your problem,

DATA: BEGIN OF it OCCURS 10,
  f1 TYPE i,
  qant TYPE i,
  sum TYPE i,
END OF it.
DATA: change TYPE i.

change = 10.
DO 5 TIMES.
  it-f1 = change.
  APPEND it TO it.
  ADD 10 TO : change.
ENDDO.

CLEAR: change.

START-OF-SELECTION.
  WRITE : 'Please Enter Qant and Press Button Bellow'.
  SET BLANK LINES ON.
  FORMAT INPUT ON.
  WRITE: / change.
  FORMAT INPUT OFF.
  WRITE / '>>> OK <<<' COLOR 5 HOTSPOT.

AT LINE-SELECTION.
  data: line_no TYPE i,
        value type i.
  line_no = sy-lilli - 1.
  READ line line_no FIELD VALUE change.
  LOOP AT it INTO it.
    it-qant =   change.
    it-sum = it-f1 + change.
    MODIFY it FROM it INDEX sy-tabix.
    WRITE: / it-f1, it-qant, it-sum.
  ENDLOOP.

Please Reply if any Issue.

Kind Regards,

Faisal

0 Kudos
133

Hi,

your coding is exactly correct.but one small issue.

itab-quan is table value.but in your coding it shows 0 value .

Notebefore the user change itab-quan it should show table value not Zero.

can you help me.

Regards,

K.Karthikeyan.

0 Kudos
133

Hi,

Please Test the following Code and let me know that it is working accordingly or not if not than please Explain it bit more.

change = 10.
DO 5 TIMES.
  it-f1 = change.
  it-qant = sy-index.
  APPEND it TO it.
  ADD 10 TO : change.
ENDDO.

CLEAR: change.

START-OF-SELECTION.
  WRITE : 'Please Enter Qant and Press Button Bellow'.
  SET BLANK LINES ON.

  LOOP AT it INTO it.
    WRITE: / it-f1, it-qant, it-sum .
  ENDLOOP.
  WRITE: / ,/ 'Please Enter Value you want to add in QANT'.
  FORMAT INPUT ON.
  WRITE: / change.
  FORMAT INPUT OFF.
  WRITE / '>>> OK <<<' COLOR 5 HOTSPOT.

AT LINE-SELECTION.
  DATA: line_no TYPE i,
        value TYPE i.
  line_no = sy-lilli - 1.
  READ LINE line_no FIELD VALUE change.
  LOOP AT it INTO it.
    it-qant = it-qant + change.
    it-sum = it-f1 + change.
    MODIFY it FROM it INDEX sy-tabix.
    WRITE: / it-f1, it-qant, it-sum.
  ENDLOOP.

Kind Regards,

Faisal

0 Kudos
133

Hi Faisal,

this my coding.

TABLES: EORD,EKPO,EKET,T015M,LFA1,SSCRFIELDS.

INCLUDE <ICON>.

SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME.

SELECT-OPTIONS:LIFNR FOR EORD-LIFNR NO-EXTENSION NO INTERVALS.

SELECT-OPTIONS:EBELN FOR EORD-EBELN NO-EXTENSION NO INTERVALS.

PARAMETERS : X1 AS CHECKBOX." DEFAULT 'X'.

SELECTION-SCREEN:END OF BLOCK B1.

SELECTION-SCREEN:BEGIN OF BLOCK B2 WITH FRAME.

PARAMETERS:R1 RADIOBUTTON GROUP CLS.

PARAMETERS:R2 RADIOBUTTON GROUP CLS.

PARAMETERS:R3 RADIOBUTTON GROUP CLS.

PARAMETERS:R4 RADIOBUTTON GROUP CLS.

SELECTION-SCREEN:END OF BLOCK B2.

DATA: BEGIN OF ITAB OCCURS 0,

LIFNR LIKE EORD-LIFNR,

EBELN LIKE EORD-EBELN,

EBELP LIKE EORD-EBELP,

VRTYP LIKE EORD-VRTYP,

EMATN LIKE EKPO-EMATN,

TXZ01 LIKE EKPO-TXZ01,

BSTYP LIKE EKPO-BSTYP,

MENGE LIKE EKET-MENGE,

QUAN LIKE EKET-MENGE,

NAME1 LIKE LFA1-NAME1,

DAY1 TYPE P DECIMALS 2,

DAY2 TYPE P DECIMALS 2,

DAY3 TYPE P DECIMALS 2,

DAY4 TYPE P DECIMALS 2,

DAY5 TYPE P DECIMALS 2,

DAY6 TYPE P DECIMALS 2,

DAY7 TYPE P DECIMALS 2,

DAY8 TYPE P DECIMALS 2,

DAY9 TYPE P DECIMALS 2,

DAY10 TYPE P DECIMALS 2,

DAY11 TYPE P DECIMALS 2,

DAY12 TYPE P DECIMALS 2,

DAY13 TYPE P DECIMALS 2,

DAY14 TYPE P DECIMALS 2,

DAY15 TYPE P DECIMALS 2,

DAY16 TYPE P DECIMALS 2,

DAY17 TYPE P DECIMALS 2,

DAY18 TYPE P DECIMALS 2,

DAY19 TYPE P DECIMALS 2,

DAY20 TYPE P DECIMALS 2,

DAY21 TYPE P DECIMALS 2,

DAY22 TYPE P DECIMALS 2,

DAY23 TYPE P DECIMALS 2,

DAY24 TYPE P DECIMALS 2,

DAY25 TYPE P DECIMALS 2,

DAY26 TYPE P DECIMALS 2,

DAY27 TYPE P DECIMALS 2,

DAY28 TYPE P DECIMALS 2,

DAY29 TYPE P DECIMALS 2,

DAY30 TYPE P DECIMALS 2,

DAY31 TYPE P DECIMALS 2,

END OF ITAB.

START-OF-SELECTION.

  • SET PF-STATUS 'STANDARD'.

  • IF R1 EQ 'X'.

  • PERFORM CREATE.

  • PERFORM DISPLAY_DATA.

  • PERFORM WRITE_DATA.

  • ELSEIF R2 EQ 'X'.

  • PERFORM DISPLAY.

  • PERFORM DISPLAY_DATA.

*ELSEIF R3 EQ 'X'.

  • PERFORM CHANGE.

  • PERFORM DISPLAY_DATA.

*ELSEIF R4 EQ 'X'.

  • PERFORM PRINT.

  • PERFORM DISPLAY_DATA.

  • ENDIF.

&----


*& Form CREATE

&----


  • text

----


*FORM CREATE.

*IF R1 = 'X'.

SELECT * FROM EORD INTO CORRESPONDING FIELDS OF TABLE ITAB

WHERE LIFNR IN LIFNR

AND EBELN IN EBELN

AND VRTYP = 'L'.

LOOP AT ITAB.

SELECT SINGLE * FROM EKPO WHERE EBELN = ITAB-EBELN

AND EBELP = ITAB-EBELP

AND BSTYP = 'L'.

ITAB-EMATN = EKPO-EMATN.

ITAB-TXZ01 = EKPO-TXZ01.

SELECT SINGLE * FROM EKET WHERE EBELN = ITAB-EBELN

AND EBELP = ITAB-EBELP.

ITAB-MENGE = EKPO-MENGE.

ITAB-QUAN = EKPO-MENGE.

SELECT SINGLE NAME1 FROM LFA1 INTO ITAB-NAME1 WHERE LIFNR = ITAB-LIFNR.

MODIFY ITAB.

ENDLOOP.

LOOP AT ITAB.

ITAB-DAY1 = ITAB-MENGE / 26.

ITAB-DAY2 = ITAB-MENGE / 26.

ITAB-DAY3 = ITAB-MENGE / 26.

ITAB-DAY4 = ITAB-MENGE / 26.

ITAB-DAY5 = ITAB-MENGE / 26.

ITAB-DAY6 = ITAB-MENGE / 26.

ITAB-DAY7 = ITAB-MENGE / 26.

ITAB-DAY8 = ITAB-MENGE / 26.

ITAB-DAY9 = ITAB-MENGE / 26.

ITAB-DAY10 = ITAB-MENGE / 26.

ITAB-DAY11 = ITAB-MENGE / 26.

ITAB-DAY12 = ITAB-MENGE / 26.

ITAB-DAY13 = ITAB-MENGE / 26.

ITAB-DAY14 = ITAB-MENGE / 26.

ITAB-DAY15 = ITAB-MENGE / 26.

ITAB-DAY16 = ITAB-MENGE / 26.

ITAB-DAY17 = ITAB-MENGE / 26.

ITAB-DAY18 = ITAB-MENGE / 26.

ITAB-DAY19 = ITAB-MENGE / 26.

ITAB-DAY20 = ITAB-MENGE / 26.

ITAB-DAY21 = ITAB-MENGE / 26.

ITAB-DAY22 = ITAB-MENGE / 26.

ITAB-DAY23 = ITAB-MENGE / 26.

ITAB-DAY24 = ITAB-MENGE / 26.

ITAB-DAY25 = ITAB-MENGE / 26.

ITAB-DAY26 = ITAB-MENGE / 26.

ITAB-DAY27 = ITAB-MENGE / 26.

ITAB-DAY28 = ITAB-MENGE / 26.

ITAB-DAY29 = ITAB-MENGE / 26.

ITAB-DAY30 = ITAB-MENGE / 26.

ITAB-DAY31 = ITAB-MENGE / 26.

MODIFY ITAB.

ENDLOOP.

*ENDFORM. "CREATE

&----


*& Form DISPLAY_DATA

&----


  • text

----


*FORM DISPLAY_DATA.

WRITE: /50 'RAJSRIYA AUTOMOTIVE INDUSTRIES PVT LTD'.

WRITE: /55 'SCHEDULE FOR THE MONTH OF'.

SKIP 2.

WRITE: /10 'TO'.

WRITE: /15 ITAB-NAME1.

LOOP AT ITAB.

SKIP 2.

WRITE: /87 'Delivery DAY SAP' ,

110 ITAB-MENGE.

WRITE: /87 'Delivery DAY Manual' ,

110 ITAB-QUAN INPUT ON.

  • HIDE: ITAB-QUAN.

SKIP 2.

WRITE: /10 'Material No',

25 'Material Name',

50 '1',

58 '2',

66 '3',

74 '4',

82 '5',

90 '6',

98 '7',

106 '8',

114 '9',

122 '10'.

SKIP 1.

WRITE: /10 ITAB-EMATN,

25 ITAB-TXZ01,

50 ITAB-DAY1 LEFT-JUSTIFIED INPUT ON,

58 ITAB-DAY2 LEFT-JUSTIFIED INPUT ON,

66 ITAB-DAY3 LEFT-JUSTIFIED INPUT ON,

74 ITAB-DAY4 LEFT-JUSTIFIED INPUT ON,

82 ITAB-DAY5 LEFT-JUSTIFIED INPUT ON,

90 ITAB-DAY6 LEFT-JUSTIFIED INPUT ON,

98 ITAB-DAY7 LEFT-JUSTIFIED INPUT ON,

106 ITAB-DAY8 LEFT-JUSTIFIED INPUT ON,

114 ITAB-DAY9 LEFT-JUSTIFIED INPUT ON,

122 ITAB-DAY10 LEFT-JUSTIFIED INPUT ON.

SKIP 1.

ULINE 50(77).

WRITE:/50 '11',

58 '12',

66 '13',

74 '14',

82 '15',

90 '16',

98 '17',

106 '18',

114 '19',

122 '20'.

SKIP 1.

WRITE:/50 ITAB-DAY11 LEFT-JUSTIFIED INPUT ON,

58 ITAB-DAY12 LEFT-JUSTIFIED INPUT ON,

66 ITAB-DAY13 LEFT-JUSTIFIED INPUT ON,

74 ITAB-DAY14 LEFT-JUSTIFIED INPUT ON,

82 ITAB-DAY15 LEFT-JUSTIFIED INPUT ON,

90 ITAB-DAY16 LEFT-JUSTIFIED INPUT ON,

98 ITAB-DAY17 LEFT-JUSTIFIED INPUT ON,

106 ITAB-DAY18 LEFT-JUSTIFIED INPUT ON,

114 ITAB-DAY19 LEFT-JUSTIFIED INPUT ON,

122 ITAB-DAY20 LEFT-JUSTIFIED INPUT ON.

SKIP 1.

ULINE 50(77).

WRITE:/50 '21',

58 '22',

66 '23',

74 '24',

82 '25',

90 '26',

98 '27',

106 '28',

114 '29',

122 '30'.

SKIP 1.

WRITE:/50 ITAB-DAY21 LEFT-JUSTIFIED INPUT ON,

58 ITAB-DAY22 LEFT-JUSTIFIED INPUT ON,

66 ITAB-DAY23 LEFT-JUSTIFIED INPUT ON,

74 ITAB-DAY24 LEFT-JUSTIFIED INPUT ON,

82 ITAB-DAY25 LEFT-JUSTIFIED INPUT ON,

90 ITAB-DAY26 LEFT-JUSTIFIED INPUT ON,

98 ITAB-DAY27 LEFT-JUSTIFIED INPUT ON,

106 ITAB-DAY28 LEFT-JUSTIFIED INPUT ON,

114 ITAB-DAY29 LEFT-JUSTIFIED INPUT ON,

122 ITAB-DAY30 LEFT-JUSTIFIED INPUT ON.

SKIP 1.

ULINE 50(77).

WRITE:/50 '31'.

SKIP 1.

WRITE:/50 ITAB-DAY31 LEFT-JUSTIFIED INPUT ON.

ENDLOOP.

SKIP 5.

WRITE:/10 'NOTE', 75 'For rajsriya automotive industries (p) ltd'.

WRITE:/10 'Strictly adhere to the schedule Qty'.

SKIP 2.

WRITE:/80 'authorised signatory'.

*******************************************

*ENDFORM. "DISPLAY_DATA

AT LINE-SELECTION.

HIDE: ITAB-QUAN.

LOOP AT ITAB.

ITAB-DAY1 = ITAB-QUAN / 26.

ITAB-DAY2 = ITAB-QUAN / 26.

ITAB-DAY3 = ITAB-QUAN / 26.

ITAB-DAY4 = ITAB-QUAN / 26.

ITAB-DAY5 = ITAB-QUAN / 26.

ITAB-DAY6 = ITAB-QUAN / 26.

ITAB-DAY7 = ITAB-QUAN / 26.

ITAB-DAY8 = ITAB-QUAN / 26.

ITAB-DAY9 = ITAB-QUAN / 26.

ITAB-DAY10 = ITAB-QUAN / 26.

ITAB-DAY11 = ITAB-QUAN / 26.

ITAB-DAY12 = ITAB-QUAN / 26.

ITAB-DAY13 = ITAB-QUAN / 26.

ITAB-DAY14 = ITAB-QUAN / 26.

ITAB-DAY15 = ITAB-QUAN / 26.

ITAB-DAY16 = ITAB-QUAN / 26.

ITAB-DAY17 = ITAB-QUAN / 26.

ITAB-DAY18 = ITAB-QUAN / 26.

ITAB-DAY19 = ITAB-QUAN / 26.

ITAB-DAY20 = ITAB-QUAN / 26.

ITAB-DAY21 = ITAB-QUAN / 26.

ITAB-DAY22 = ITAB-QUAN / 26.

ITAB-DAY23 = ITAB-QUAN / 26.

ITAB-DAY24 = ITAB-QUAN / 26.

ITAB-DAY25 = ITAB-QUAN / 26.

ITAB-DAY26 = ITAB-QUAN / 26.

ITAB-DAY27 = ITAB-QUAN / 26.

ITAB-DAY28 = ITAB-QUAN / 26.

ITAB-DAY29 = ITAB-QUAN / 26.

ITAB-DAY30 = ITAB-QUAN / 26.

ITAB-DAY31 = ITAB-QUAN / 26.

MODIFY ITAB.

ENDLOOP.

WRITE: /50 'RAJSRIYA AUTOMOTIVE INDUSTRIES PVT LTD'.

WRITE: /55 'SCHEDULE FOR THE MONTH OF'.

SKIP 2.

WRITE: /10 'TO'.

WRITE: /15 ITAB-NAME1.

LOOP AT ITAB.

SKIP 2.

WRITE: /87 'Delivery DAY SAP' ,

110 ITAB-MENGE.

WRITE: /87 'Delivery DAY Manual' ,

110 ITAB-QUAN INPUT ON.

  • HIDE: ITAB-QUAN.

SKIP 2.

WRITE: /10 'Material No',

25 'Material Name',

50 '1',

58 '2',

66 '3',

74 '4',

82 '5',

90 '6',

98 '7',

106 '8',

114 '9',

122 '10'.

SKIP 1.

WRITE: /10 ITAB-EMATN,

25 ITAB-TXZ01,

50 ITAB-DAY1 LEFT-JUSTIFIED, "INPUT ON,

58 ITAB-DAY2 LEFT-JUSTIFIED ,"INPUT ON,

66 ITAB-DAY3 LEFT-JUSTIFIED ,"INPUT ON,

74 ITAB-DAY4 LEFT-JUSTIFIED ,"INPUT ON,

82 ITAB-DAY5 LEFT-JUSTIFIED ,"INPUT ON,

90 ITAB-DAY6 LEFT-JUSTIFIED ,"INPUT ON,

98 ITAB-DAY7 LEFT-JUSTIFIED ,"INPUT ON,

106 ITAB-DAY8 LEFT-JUSTIFIED ,"INPUT ON,

114 ITAB-DAY9 LEFT-JUSTIFIED ,"INPUT ON,

122 ITAB-DAY10 LEFT-JUSTIFIED ."INPUT ON.

SKIP 1.

ULINE 50(77).

WRITE:/50 '11',

58 '12',

66 '13',

74 '14',

82 '15',

90 '16',

98 '17',

106 '18',

114 '19',

122 '20'.

SKIP 1.

WRITE:/50 ITAB-DAY11 LEFT-JUSTIFIED ,"INPUT ON,

58 ITAB-DAY12 LEFT-JUSTIFIED ,"INPUT ON,

66 ITAB-DAY13 LEFT-JUSTIFIED ,"INPUT ON,

74 ITAB-DAY14 LEFT-JUSTIFIED ,"INPUT ON,

82 ITAB-DAY15 LEFT-JUSTIFIED ,"INPUT ON,

90 ITAB-DAY16 LEFT-JUSTIFIED ,"INPUT ON,

98 ITAB-DAY17 LEFT-JUSTIFIED ,"INPUT ON,

106 ITAB-DAY18 LEFT-JUSTIFIED ,"INPUT ON,

114 ITAB-DAY19 LEFT-JUSTIFIED ,"INPUT ON,

122 ITAB-DAY20 LEFT-JUSTIFIED ."INPUT ON.

SKIP 1.

ULINE 50(77).

WRITE:/50 '21',

58 '22',

66 '23',

74 '24',

82 '25',

90 '26',

98 '27',

106 '28',

114 '29',

122 '30'.

SKIP 1.

WRITE:/50 ITAB-DAY21 LEFT-JUSTIFIED," INPUT ON,

58 ITAB-DAY22 LEFT-JUSTIFIED ,"INPUT ON,

66 ITAB-DAY23 LEFT-JUSTIFIED ,"INPUT ON,

74 ITAB-DAY24 LEFT-JUSTIFIED ,"INPUT ON,

82 ITAB-DAY25 LEFT-JUSTIFIED ,"INPUT ON,

90 ITAB-DAY26 LEFT-JUSTIFIED," INPUT ON,

98 ITAB-DAY27 LEFT-JUSTIFIED ,"INPUT ON,

106 ITAB-DAY28 LEFT-JUSTIFIED ,"INPUT ON,

114 ITAB-DAY29 LEFT-JUSTIFIED ,"INPUT ON,

122 ITAB-DAY30 LEFT-JUSTIFIED ."INPUT ON.

SKIP 1.

ULINE 50(77).

WRITE:/50 '31'.

SKIP 1.

WRITE:/50 ITAB-DAY31 LEFT-JUSTIFIED INPUT ON.

ENDLOOP.

SKIP 5.

WRITE:/10 'NOTE', 75 'For rajsriya automotive industries (p) ltd'.

WRITE:/10 'Strictly adhere to the schedule Qty'.

SKIP 2.

WRITE:/80 'authorised signatory'.

Note 'Delivery DAY SAP' 10

'Delivery DAY Manual' 10

both are same field. this value 10 i am getting in itab-menge and second one itab-Quan from table Ekpo.

the second one is edit mode if the user change the 10 to 100.

ITAB-DAY1 = ITAB-QUAN / 26 and so on value should be change.

if 10: ITAB-DAY1 = ITAB-QUAN / 26 = 0.38

if 100 ITAB-DAY1 = ITAB-QUAN / 26 = 3.8.

can you help me.

Regards,

K.Karthikeyan.

Former Member
0 Kudos
133

Hi Karthick,

This code works as per ur requirement.....


report<> no standard page heading.
PARAMETERS: p_fld1 TYPE i,
      p_fld2 TYPE i,
      p_fld3 TYPE i,
      p_fld4 TYPE i,
      p_fld5 TYPE i.
DATA:
      w_ucomm TYPE i.

WRITE: 'p_fld1',p_fld1,
       / 'p_fld2',p_fld2,
      /  'p_fld3',p_fld3,
       / 'p_fld4',p_fld4,
       / 'p_fld5',p_fld5,
       / 'UCOMM',w_ucomm INPUT ON.

      set pf-status 'ADD'.

AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'ADD'.
      READ LINE 6
      FIELD VALUE w_ucomm.
      IF sy-subrc EQ 0.
        p_fld1 = p_fld1 + w_ucomm.
        p_fld2 = p_fld2 + w_ucomm.
        p_fld3 = p_fld3 + w_ucomm.
        p_fld4 = p_fld4 + w_ucomm.
        p_fld5 = p_fld5 + w_ucomm.
      ENDIF.

        MODIFY LINE 1 FIELD VALUE p_fld1.
        MODIFY LINE 2 FIELD VALUE p_fld2.
        MODIFY LINE 3 FIELD VALUE p_fld3.
        MODIFY LINE 4 FIELD VALUE p_fld4.
        MODIFY LINE 5 FIELD VALUE p_fld5.

  ENDCASE.

Hope its helpful.

Regards,

Mdi.Deeba.