2007 Dec 14 9:07 AM
Hi Gurus,
plz help me in this coding part.
. Fix the checking for Gross Sales, General Discount, Trade Discount, Net Value, Tax Amount by adding following condition.
If VBRK-VBTYP = M or P, multiply this value with 1.
If VBRK-VBTYP = O, multiply this value with -1.
how to code for this Gurus.
plz help me...
Rewards are gaurenteed.
thanks & regards
sirish
2007 Dec 14 9:20 AM
"you need not do anything for first condition.
"i.e. VBRK-VBTYP = M or P, multiply this value with 1.
"multiplying by 1 is not going change anything .
"So check for second cond..
SELECT <field list> INTO <itab> from <DBTAB>
WHERE <cond>.
IF <itab>-VBTYP = 'O'.
"mulptiply value by -1.
ENDIF.
APPEND <itab>.
ENDSELECT.
2007 Dec 14 9:13 AM
Hi,
Do like this
If ( VBRK-VBTYP = 'M' ) or
( VBRK-VBTYP = 'P' ) .
lv_var = var * 1
elseIf VBRK-VBTYP = 'O'.
lv_var = var * ( -1 ).
endif.
Regards,
Prashant
2007 Dec 14 9:13 AM
Hi,
If ( VBRK-VBTYP = 'M' ) or
( VBRK-VBTYP = 'P' ) .
value = value * 1.
elseIf VBRK-VBTYP = 'O'.
value = value * -1.
endif.
Reagrds,
Nagaraj
2007 Dec 14 9:13 AM
if VBRK-VBTYP = 'M' or VBRK-VBTYP = 'P'.
multiply VARIABLE by 1.
elseif VBRK-VBTYP = 'O'.
multiply VARIABLE by -1.
endif.
2007 Dec 14 9:20 AM
"you need not do anything for first condition.
"i.e. VBRK-VBTYP = M or P, multiply this value with 1.
"multiplying by 1 is not going change anything .
"So check for second cond..
SELECT <field list> INTO <itab> from <DBTAB>
WHERE <cond>.
IF <itab>-VBTYP = 'O'.
"mulptiply value by -1.
ENDIF.
APPEND <itab>.
ENDSELECT.
2007 Dec 14 9:27 AM
Hi,
try this code
it will work for sure
If ( VBRK-VBTYP = 'M' ) or
( VBRK-VBTYP = 'P' ) .
value = value * 1.
elseIf VBRK-VBTYP = 'O'.
value = value * -1.
endif.
plzzzz reward if useful.
feel free to ask any quiries
my mail id mutyalasunilkumar@gmail.com
2007 Dec 14 9:36 AM
Hi,
Gross Sales, General Discount, Trade Discount, Net Value, Tax Amount
First decide from which tables you want to pickup the vaues for the fields you mentioned.
If you know the tables,Declare internal table with these fields.
Then write select stmt using join cond fetching from more than 2 tables if required.
Select f1 f2 f3 from <Table_Name>
into table itab
where <Cond>.
*f1 contains value of vbtyp.
Loop at itab where f1 = 'O'.
*if itab-f1 = 'O'.
itab-f2 = itab-f2 * ( -1 ) .
Modify itab clear itab.
*endif.
endloop.
Tax Amount field VBRP-MWSBP
Net Value field VBRP-NETWR
Thanks
Sivaparvathi.
Please reward points if helpful.
Message was edited by:
Siva Parvathi