Skip to Content
-3
Jul 10, 2020 at 01:39 PM

Inner join not working.

208 Views

  1. when i comment inner join lfa1 line, only then data is getting fetched
  2. SELECT a~rldnr,
  3. a~rbukrs,
  4. a~gjahr,
  5. a~belnr,
  6. a~racct,
  7. a~rcntr,
  8. a~prctr,
  9. a~wsl,
  10. a~budat,
  11. a~blart,
  12. a~zuonr,
  13. a~lifnr,
  14. a~ps_posid,
  15. a~sgtxt,
  16. a~koart,
  17. a~timestamp,
  18. b~saknr,
  19. b~txt50,
  20. c~bukrs,
  21. c~belnr AS belnr1,
  22. c~gjahr AS gjahr1,
  23. c~bktxt,
  24. d~name1,
  25. d~lifnr AS lifnr1,
  26. e~posid,
  27. e~post1,
  28. f~kostl,
  29. f~ltext
  30. FROM acdoca AS a
  31. INNER JOIN skat AS b ON a~racct EQ b~saknr AND b~spras = @sy-langu
  32. INNER JOIN bkpf AS c ON a~rbukrs EQ c~bukrs AND a~gjahr EQ c~gjahr AND a~belnr EQ c~belnr
  33. INNER JOIN lfa1 AS d ON a~lifnr EQ d~lifnr INNER JOIN prps AS e ON a~ps_posid EQ e~posid
  34. LEFT OUTER JOIN cskt AS f ON a~rcntr EQ f~kostl AND f~spras = @sy-langu
  35. INTO TABLE @DATA(lt_acdoca)
  36. WHERE a~rldnr = @lc_led
  37. AND a~rbukrs = @p_rbukrs
  38. AND a~belnr IN @so_belnr
  39. AND a~racct IN @so_racct.