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

logic needed urgent

Former Member
0 Likes
528

Hi Friends,

I need logic (code for the following requirement.

1. Bank guarantees received are entered by F-57 transaction as a noted item in system and the following data will be captured in the respective field.

Document date: Bank Guarantee date

Posting date: Date of entry

Reference field: BG Number

Document header text: Bank guarantee type

Assignment: Bank name

Special G/L Assignment: Bank account number

Text: Bank address

Due date: Claim end date

2. Posting keys (BSEG-BSCHL) 39 & 29 are used in F-57 transaction with special G/L Indicator (BSEG-UMSKZ) at time of Entering statistical postings and Reversal respectively

3. Cross check the period of validity of bank guarantee by comparing the due date (BSEG-ZFBDT) at the time of entering statistical postings and Document date (BKPF-BLDAT) at the time of Reversal.

4. If the bank guarantee cancels or reversed before due date (BSEG-ZFBDT) cancellation date i.e. Document date of reversal is to be populated in the report and in other case the due date is to be populated in the report.

Selection screen has the fields

BKPF-BUKRS Mandatory

LFA1/BSEG-LIFNR Optional

BSEG-ZFBDT Optional

BKPF-BLADT Optional

The o/p structure has the following fields

BKPF-XBLNR BG NO(Reference)

BSEG-LIFNR Vendor code

LFA1-NAME1 Vendor Name

BKPF-BLDAT Start date(Document date)

BSEG-ZFBDT End date(Due date)

BSEG-WRBTR Amount

BKPF-WAERS Currency

BSEG-ZUONR Bank Name(Assignment)

BSEG-SGTXT Bank Address

BSEG-HZUON Account Number

BKPF-BKTXT BG Type

BSEG-ZFBDT Claim end date

Hi Friends,

I need logic (code for the following requirement.

1. Bank guarantees received are entered by F-57 transaction as a noted item in system and the following data will be captured in the respective field.

Document date: Bank Guarantee date

Posting date: Date of entry

Reference field: BG Number

Document header text: Bank guarantee type

Assignment: Bank name

Special G/L Assignment: Bank account number

Text: Bank address

Due date: Claim end date

2. Posting keys (BSEG-BSCHL) 39 & 29 are used in F-57 transaction with special G/L Indicator (BSEG-UMSKZ) at time of Entering statistical postings and Reversal respectively

3. Cross check the period of validity of bank guarantee by comparing the due date (BSEG-ZFBDT) at the time of entering statistical postings and Document date (BKPF-BLDAT) at the time of Reversal.

4. If the bank guarantee cancels or reversed before due date (BSEG-ZFBDT) cancellation date i.e. Document date of reversal is to be populated in the report and in other case the due date is to be populated in the report.

Selection screen has the fields

BKPF-BUKRS Mandatory

LFA1/BSEG-LIFNR Optional

BSEG-ZFBDT Optional

BKPF-BLADT Optional

The o/p structure has the following fields

BKPF-XBLNR BG NO(Reference)

BSEG-LIFNR Vendor code

LFA1-NAME1 Vendor Name

BKPF-BLDAT Start date(Document date)

BSEG-ZFBDT End date(Due date)

BSEG-WRBTR Amount

BKPF-WAERS Currency

BSEG-ZUONR Bank Name(Assignment)

BSEG-SGTXT Bank Address

BSEG-HZUON Account Number

BKPF-BKTXT BG Type

BSEG-ZFBDT Claim end date

1 REPLY 1
Read only

Former Member
0 Likes
449

Hi,

define internal table

It_bseg with fields BURKS, BELNR,GJAHR, BUZEI and other field (look the output fields).

it_bkpf with fields BURKS, BELNR,GJAHR anmd other required fields.

it_lfa1 with fields LIFNR and NAME1.

NOw

SELECT BURKS, BELNR,GJAHR ,<other required fileds>

into table it_bkpf from BKPF

where BUKRS in/= <selectionscreen-burks>

and bladt in/= <selectionscreen--bladt>.

If it_bkpf[] is not initial.

select BURKS, BELNR,GJAHR, BUZEI and other fields

into table it_bseg from bseg

for all entries in it_bkpf

where burks = it_bkpf-burks

and belnr = it_bkpf-belnr

and gjahr = it_bkpf-gjahr

and ZFBDT in/= <selection screen ZFBDT>

endif.

Now

select lifnr name1 from lfa1 into it_lfa1

where lifnr in <selection scfreen lifnr>.

.

YOu have three tables now..

you can loop at 1st table get the output fields put in into work area

read 2nd table relevant to first one and then read IT_LFA1 table with lifnr same as lifnr in BSEG and fill the final internal table.

Any doubts in retrieving please feel free to post your question

rewards if useful,

regards,

nazeer

Message was edited by:

'Nazeer'