on 08-19-2009 8:56 AM
hi guru,
i have one column in main window where my output is quantities(g_quantity) stores.
ex . 34,786 and 38,876
i want to add this two values and display in footer ,how to achieve this
can somebody explain me clearly..
i am awaiting for ur reply
thanks
hi
use PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
......
/: ENDPERFORM
and Use BOTTOM ENDBOTTOM to print the value in the Footer of the FOOTER WIINDOW
surya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create a footer window in the page. Now in the print program write
/: &g_quantity&
Hope it helps you.
Thanks,
Sri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
so much probleam i am facing.
actually i am writing like this ...in itcsy
FORM get_grandtotal TABLES in_tab1 STRUCTURE itcsy
out_tab1 STRUCTURE itcsy.
DATA: lc1 TYPE string,
lc2 TYPE string,
ls_tab TYPE itcsy,
l_tabix TYPE sy-tabix.
data : l_value(10).
statics l_final(10).
Read table in_tab1 WITH KEY name = 'G_TOTAL'.
IF sy-subrc EQ 0.
l_value = in_tab1-value.
ENDIF.
REPLACE ',' INTO l_value WITH ''.
CONDENSE l_value NO-GAPS.
Read table out_tab1 WITH KEY name = 'L_FINAL'.
out_tab1-value = l_final.
l_final = l_final + l_value.
CONDENSE l_final.
lc1 = l_final+0(2).
lc2 = l_final+2(3).
CONCATENATE lc1 lc2 INTO l_final SEPARATED BY ','.
out_tab1-value = l_final.
CLEAR ls_tab.
LOOP AT out_tab1 INTO ls_tab.
l_tabix = sy-tabix.
CASE ls_tab-name.
WHEN 'l_final'.
ls_tab-value = l_final.
MODIFY out_tab1 FROM ls_tab INDEX l_tabix.
ENDCASE.
ENDLOOP.
*Modify outt_tab index 1.
but here i am getting material number value in_tab1 why??????
i want g_total value..
please give me details.
hi
/: PERFORM ADD IN PROGRAM ZADD
/: USING &Value1&
/: USING &value2&
/: CHANGING &g_total&
/: EndPERFORM
in the Program ZADD.
FORM ADD TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
READ TABLE in_par INDEX 1.
l1 = in_par-value.
READ TABLE in_par INDEX 2.
l2 = in_par-value.
l3 = l1 + l2.
MOVE l3 TO out_par-value.
MODIFY out_par INDEX 1.
endform.
HI,
till my probleam didnot solve.
actually in form itself i am getting values as declaring variable &g_total&.
i want to use that value and then do the addition and prepare another variable &g_gtotal&
how to write in same perform...
find below code how i am getting the g_total value
so tell me how to do grand total using g_total values.????
FORM get_total TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA: lv_menge(20),
lv_gpreis(20),
g_total(20),
g_total1(20).
DATA:lc1 TYPE string,
lc2 TYPE string,
ls_tab TYPE itcsy,
l_tabix TYPE sy-tabix.
READ TABLE in_tab WITH KEY name = 'RESBD-MENGE'.
IF sy-subrc EQ 0.
lv_menge = in_tab-value.
ENDIF.
READ TABLE in_tab WITH KEY name = 'RESBD-GPREIS'.
IF sy-subrc EQ 0.
lv_gpreis = in_tab-value.
ENDIF.
REPLACE ',' INTO lv_gpreis WITH ''.
CONDENSE lv_gpreis NO-GAPS.
READ TABLE out_tab WITH KEY name = 'G_TOTAL'.
IF sy-subrc EQ 0.
g_total = lv_menge * lv_gpreis.
out_tab-value = g_total.
CONDENSE g_total.
lc1 = g_total+0(2).
lc2 = g_total+2(3).
CONCATENATE lc1 lc2 INTO g_total SEPARATED BY ','.
out_tab-value = g_total.
CLEAR ls_tab.
LOOP AT out_tab INTO ls_tab.
l_tabix = sy-tabix.
CASE ls_tab-name.
WHEN 'G_TOTAL'.
ls_tab-value = G_TOTAL.
MODIFY out_tab FROM ls_tab INDEX l_tabix.
ENDCASE.
ENDLOOP.
hi
for further information check the below links
http://it.toolbox.com/wiki/index.php/Sap_script#6.6.09Formatting_Date_Fields:_SET_DATE_MASK
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
surya
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.