Application Development and Automation 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: 
Read only

Regarding SUBMIT

Former Member
0 Likes
482

Hi Friends,

My requirement is as follows.

Ran a query against table BSAK to find any documents for 2007 with withholding tax base not equal to 0.00 and withholding tax code = to blank. No documents found therefore issue #1 has not reoccurred

Ran a query in table LFB1 of all vendors with tax codes on them. Uploaded these vendors to a query in table BSAK and queried for any documents with blank tax codes and withholding tax base = to 0.00. Only document 20374406 found and this is due to the tax code being added to the vendor master after the payment was posted. Issue B above has not reoccurred. Program RFWT0020 can be ran to correct issue A, but we should build an automated program that runs on a quarterly basis to correct documents with this issue

Build a batch job to

a) Query for all 1099-reportable vendors with activity for the appropriate year.

b) Take these vendors and update their corresponding payment documents via program RFWT0020.

Here my question is how to update vendors corresponding payment documents.

the program <b>RFWT0020</b> is update tax code all.

Here i write a select statement on <b>lfb1</b> and fetch vendors with taxcode.

then based on that using the for all entries i fetch the vendors from <b>bsak</b> where taxcode eq blank and tax base eq 0.00.

then after select the vendors from <b>T059q</b> where taxcode = bsak-taxcode and QSC0D = '1099'.

then after i need to update these vendors payment documents via program RFWT0020.

How can do it?

Please send ur valuable response.

Thanks & Regards,

Srinivas.

3 REPLIES 3
Read only

Former Member
0 Likes
437

Hi

U need to create a program to update the vendor before submiting the report RFWT0020.

In this program u can create a symple batch input (via call transaction) in order to update the vendor data.

Max

Read only

Former Member
0 Likes
437

Hi Max,

Thanks for ur quick reply.

Im filtering all the vendors as per my requirement but how do i update it.if i want to update it by using call transaction, i stored all the filtered vendors in one internal table but how can update my transaction by using that internal table.

i want to update the xk03 transaction.but how can i do it.can u give some sample code.

and is it possible to update the selection screen of called program by using submit.if so pls help me h can we do it?

Thanks

Srinivas.

Read only

0 Likes
437

Hi

Sorry I didn't understand your requirement very well, anyway you can do something like this:

LOOP AT T_LFB1.

  LOOP AT T_BSAK WHERE BUKRS = T_LFB1-BUKRS
                   AND LIFNR = T_LFB1-LIFNR.

    SUBMIT RFWT0020
            WITH I_BELNR   = T_BSAK-BELNR
            WITH I_BUKRS   = T_LFB1-BUKRS
            WITH I_LIFNR     = T_LFB1-LIFNR
            WITH I_TIME       = T_BSAK-BUDAT AND RETURN

  ENDLOOP.
ENDLOOP.

In this way you update a single document, u can create a range if you need to update it in massive way, something like:

LOOP AT T_LFB1.

  R_BELNR(3) = 'IEQ'.

  LOOP AT T_BSAK WHERE BUKRS = T_LFB1-BUKRS
                   AND LIFNR = T_LFB1-LIFNR.
    R_BELNR-LOW = T_BSAK-BELNR.
    APPEND R_BELNR.
  ENDLOOP.

  SUBMIT RFWT0020
          WITH I_BELNR   IN R_BELNR
          WITH I_BUKRS   = T_LFB1-BUKRS
          WITH I_LIFNR   = T_LFB1-LIFNR AND RETURN.

ENDLOOP.

But I think it's safer to update single document, because you can risk to update wrong documents by massive updating.

Max