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: 

How to join T052U with BSEG?

0 Kudos
1,882

Hi,

I am trying to Join T052U with BSEG, but don't have a clear solution yet, ask for your help!

Current solution:

BSEG(LIFNR) - LFB1(LIFNR,BUKRS)

LFB1(ZTERM) - T052U(ZTERM)

But T052U still need ZTAGG in order to join clearly, how can I join ZTAGG with BSEG?

Thank in advance!

Huachong

9 REPLIES 9

Former Member
0 Kudos
1,423

Thank you for visiting SAP Community to get answers to your questions. Since you're new in asking questions here, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful), share screenshots of what you've seen/done, make sure you've applied the appropriate tags, and use a more descriptive subject line. The more details you provide, the more likely it is that members will be able to assist you. You should also make sure you're using all the appropriate tags, so the right experts can find your question.

Should you wish, you can revise your question now by selecting Actions, then Edit.

Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.

Best regards,

SAP Community moderator

TammyPowlas
SAP Mentor
SAP Mentor
0 Kudos
1,423

Hello - have you looked at BSEG-ZTERM field to join to either LFB1 or T052U?

0 Kudos
1,423

Hi Tammy,

I have tried to join BSEG ZTERM to T052U, but the result have still duplicates, because of ZTAGG(T052U), which is not in BSEG.

BR,

Huachong

0 Kudos
1,423

Hi - are you using ABAP? If so there is a way to remove duplicates; you can also look at Raymond's suggestion below

0 Kudos
1,423

Hi, I think I put the wrong Tag here, actually I use SQL to join the tables, sorry if I made the misunderstanding.

RaymondGiuseppi
Active Contributor
1,423

ZTAGG should be built based on day's number of Baseline Date. Look for first record, in ascending order, in T052 / T052U with ZTAGG greater or equal to this day, ZFBDT-6(2) if none found look for a record with ZTAGG equal zero.

Hint: Analyze a FM such as DETERMINE_DUE_DATE.

0 Kudos
1,423

Hi Raymond, thanks a lot for your reply!

I think I put the wrong Tag here, actually I don't use ABAP, instead, I use SQL to join the tables, sorry if I made the misunderstanding.

Thanks,

Huachong

0 Kudos
1,423

I provided the rules, now build the SQL statement, e.g. join without ZTAGG and add a WHERE clause.

ORANGEHONH
Explorer
0 Kudos
1,345

I also suffer this problem..