04-26-2016 3:39 PM
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?
04-26-2016 4: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.
04-26-2016 4: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.
04-26-2016 4:10 PM
LDB does not have EKPO or EKKN Table but I need to drive the gL code for EKKN table.
That why I defined the Extra field .
I am very beginner in ABAP.
04-26-2016 4:25 PM
04-26-2016 4:43 PM
HI ,
I did remove the last code but problem is that some time PO has multiple line and we need all line where it got posted /...
In the case if I remove th Last 2 coding line I get only GL code last line and I need both Line and both line .
04-26-2016 4:44 PM
In shot
my requirement is get the GL code for vendor line item for open item for RE document .from EKKN.table
04-26-2016 4:52 PM
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.
04-26-2016 11: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?
04-27-2016 3:07 AM
This (where EBELN) has been pointed out already.
Also why you are having EBELN twice in where condition?