cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SCRIPT

Former Member
0 Kudos

HI i am working on a form to print customer statement of account.

the selection screen has company code , customer number statemnt date and two radio buttons.

if i select branch only radio button then dis will rint the statemnt of the customer number entered.if i cliked on head office radio button the it prints a single statemnt of acount for tht customer along with the account info of its head branch and other sub branches of head branch.

bsid is used to get open items n bsad to get cleared items.

problem is that the documents which are there in bsad are not in bsid and the specification says that to get clearing docs i shud check bsad-augbl = bsad-belnr.

i have to print the correspondin clearin docs(payment or credit)jus blow the corresponding invoices.

can anyone help me out.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thnx nidhi for d info seems a lil bit matcin from what i did still sendin u sme details of my procedure.

hope u guide me again.

what i have done is , i have selected all the payment docs and credit docs that clear the invoice completely from bsad in one table t1 and all the corresponding invoices from bsad , only dose that have been cleared by dose docs in another internal table t2.then from bsid i have sepearated all the credit payment doc and credit docs in to another internal table t3 and all invoices into table t4.

After that a have appended t1 to t3 and t2 to t4.to get all payment and credit docs in t3 and all invoices in t4.

then applied d loop on t4 then t3.sorted the two tables acc to d date of issue.

is it somewhat related to what u conveyed

Former Member
0 Kudos

Hi,

You can select all the documents from BSID and BSAD.

And then get the invoice document for the payment document(The payment document would be the cleared document i.e. where BSAD-AUGBL = BSAD-BELNR).This scenario would only work when there are full payments for the invoices.

You can then put the two in one internal table with sequence nos , sort it and then print it.