2010 Dec 28 6:10 AM
Hello Expoert,
I am using FM this in a custom program to unblock the FI and MM invoice. My problem is this work fine if no of invoice are less than 500 if no of invoices are more than 500 program execute properly but few invoice are not unblocked while the sy-subrc = 0 I applied a counter on this value. I means if sy-subrc = 0 increase counter invoice unblocked by 1.
I cross check this by debug. When I check the custom program by debug for each invoice its work fine but when I execute it directly there is problem.
My Code :
it_accchg-fdname = 'ZLSPR '.
it_accchg-oldval = 'A'.
it_accchg-newval = ' '.
APPEND it_accchg.
break marotd.
CALL FUNCTION 'FI_DOCUMENT_CHANGE'
EXPORTING
i_awtyp = l_awtyp
i_awref = l_awref
i_aworg = l_aworg
i_lifnr = bseg-lifnr
TABLES
t_accchg = it_accchg
EXCEPTIONS
no_reference = 1
no_document = 2
many_documents = 3
overwrite_creditcard = 4
OTHERS = 5.
IF sy-subrc = 0.
ADD 1 TO w_unbl_mm.
ELSE.
ADD 1 TO w_unkw_mm.
MOVE-CORRESPONDING s_file TO it_zbbt004.
APPEND it_zbbt004.
ADD 1 TO cnt_records_transfered.
ADD 1 TO w_insr_mm.
no = 'X'.
ENDIF.
Please suggest.
Regards
Swati Namdev
Hello Expoert,
I am using FM this in a custom program to unblock the FI and MM invoice. My problem is this work fine if no of invoice are less than 500 if no of invoices are more than 500 program execute properly but few invoice are not unblocked while the sy-subrc = 0 I applied a counter on this value. I means if sy-subrc = 0 increase counter invoice unblocked by 1.
I cross check this by debug. When I check the custom program by debug for each invoice its work fine but when I execute it directly there is problem.
My Code :
it_accchg-fdname = 'ZLSPR '.
it_accchg-oldval = 'A'.
it_accchg-newval = ' '.
APPEND it_accchg.
break marotd.
CALL FUNCTION 'FI_DOCUMENT_CHANGE'
EXPORTING
i_awtyp = l_awtyp
i_awref = l_awref
i_aworg = l_aworg
i_lifnr = bseg-lifnr
TABLES
t_accchg = it_accchg
EXCEPTIONS
no_reference = 1
no_document = 2
many_documents = 3
overwrite_creditcard = 4
OTHERS = 5.
IF sy-subrc = 0.
ADD 1 TO w_unbl_mm.
ELSE.
ADD 1 TO w_unkw_mm.
MOVE-CORRESPONDING s_file TO it_zbbt004.
APPEND it_zbbt004.
ADD 1 TO cnt_records_transfered.
ADD 1 TO w_insr_mm.
no = 'X'.
ENDIF.
Please suggest.
Regards
Swati Namdev
2011 May 20 6:24 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |