Skip to Content
author's profile photo Former Member
Former Member

Extra field in SQ01

HI ,

I have created a Query on Logical database KDF and Now O am trying to bring the GL code from EKKN table .

I have created a GLAccount 1 extra field and have done below coding Screen shot .

Here POnumber 2 is derived from coding as well which as below.

I am getting the correct value for POnumber2 but GL code is blank

any ideas?

GL Account1.PNG (15.6 kB)
POnumber2.PNG (12.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Apr 26, 2016 at 03:06 PM

    The code for GLACCOUNT1 does not look OK. Whether the LDB has the table EKPO? I do not think so. You should try the corresponding structure name of EKPO in place of table name.

    Add a comment
    10|10000 characters needed characters exceeded

    • I understand that. I asked you to remove the line to understand the code. Now you need to incorporate the removed where condition having EKPO-EBELP, but you should know where from the value comes. It is definitely not from LDB. So you should have another select statement to get the value of EBELP into a local variable say lv_ebelp and then your where condition becomes

      where EBELP = lv_eblep.

      Know that you only can troubleshoot your code and you will be able to do so by understanding what the code exactly doing.

  • Posted on Apr 26, 2016 at 10:04 PM

    If the logical database doesn't have two important tables that you need (and likely has tons more you don't need) then why are you using it? Just build your own JOIN and do what you need.

    Also, from what I see in the screenshot, you have

    WHERE EBELN = ...

    AND EBELN = ...

    EBELN can only have one value (PO number), how do you expect this to work?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.