on 01-29-2010 11:07 AM
hi experts i am working on std script f110_prenum_chck, my programme is working fine for single entery but
when then do multiple enteris its not cathching what to do , to cathch all the document no s belnr
please let me know , my code is as fallows
READ TABLE IN_TAB WITH KEY 'REGUP-BELNR'.
CHECK SY-SUBRC = 0.
IF IN_TAB-VALUE IS NOT INITIAL.
IM_BELNR = IN_TAB-VALUE.
ENDIF.
SELECT BELNR GJAHR BLDAT FROM REGUP INTO TABLE IT_REGUP WHERE
BELNR = IM_BELNR .
* BLDAT = IM_BLDAT.
SELECT HKONT GJAHR BELNR BLDAT SHKZG DMBTR FROM BSIS
INTO TABLE IT_BSIS FOR ALL ENTRIES IN IT_REGUP
WHERE GJAHR = IT_REGUP-GJAHR AND
BELNR = IT_REGUP-BELNR AND
BLDAT = IT_REGUP-BLDAT AND
HKONT GE ACC1 AND HKONT LE ACC2.
LOOP AT IT_BSIS INTO WA_BSIS.
* IF WA_BSIS-SHKZG = 'H'.
* WA_BSIS-DMBTR = WA_BSIS-DMBTR * -1.
* ENDIF.
WRITE WA_BSIS-DMBTR TO LV_AMOUNT.
CONDENSE LV_AMOUNT.
READ TABLE OUT_TAB WITH KEY 'LV_TAX'.
CHECK SY-SUBRC = 0.
OUT_TAB-VALUE = LV_AMOUNT.
MODIFY OUT_TAB INDEX SY-TABIX.
CLEAR: LV_AMOUNT.
ENDLOOP.
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Code Formatted by: Alvaro Tejada Galindo on Apr 20, 2010 7:34 AM
This looks like a /: perform statement from SAPScript... If so, you're only going to be able to pass a value (or single set of values)...in the changing.... at a time...
These /: PERFORM statements don't support passing entire tables...
If this is SAPScript perform.... read your input table by index from field name 'VALUE'. Increment your index if you have more than one USING field (or loop and check sy-tabix to figure out which value you just got from IN_PAR-VALUE).
Pass back your values by populating table of type itcsy...
read table out_par index 1.
out_par-value = my_value.
modify out_par index 1. "increment for every field named in your changing parameters in the same order....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.