Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

sy-subrc = 4 for table selection when in rfc call

Hi SAP Gurus,

I am working on an optimization ticket and got stucked with my parallel processing method. I tried to place my database selection in a remote fm that I am calling in my program as new task however I am not getting any data (sy-subrc = 4) when I have placed the selection in the remote rfc compared to the 51882 number of records I am getting when the selection is placed just within my program.

Here is the SQL statement:

SELECT head~mblnr

head~budat

item~matnr

item~menge

item~kunnr

item~werks

FROM ( mkpf AS head JOIN mseg AS item

ON headmblnr = itemmblnr AND

headmjahr = itemmjahr ) JOIN mara AS mat

ON itemmatnr = matmatnr

INTO TABLE t_goods_issue

WHERE head~budat IN r_date AND

item~werks IN lr_werks AND

item~bwart IN r_bwart AND

item~matnr IN r_matnr AND

mat~mtart IN r_mtart.

Your ideas will be greatly appreciated. Thanks in advance.

-allex

Not what you were looking for? View more on this topic or Ask a question