RFC calls with SAP table insert - lock tables
Hi,
I have an external server program, which is calling a rfc function many times the same time with different transaction types. There are transaction types, which are downloading information from SAP (only send data back to the caller), and there are transaction types which are uploading data to SAP (inserting/updating data on SAP).
The function calls are synchronous as the server needs to get feedback directly. The parallel work processes for RFC calls are limited, so a system overload can´t happen.
The problem now is, if the server is down for while and going to be restarted, it´s opening parallel threads and calls the function in SAP at nearly the same time. That means, it will call the function with upload requests (table must be locked), and download requests the same time.
In the upload requests, the table has to be locked, that it can´t occur that we get wrong entries...
I can only enqueue the table with just two fields... I know, that is almost like locking the whole table, but it´s not possible to lock it in a different way.
I tried to use the enqueue function with the parameter WAIT, but it didn´t help, as there where too many parallel calls and after some seconds, they were ending up with an error (Because the table has been locked by another call).
It seems that it´s trying to lock the table again for all parallel calls at exactly the same time....
The calls has to be synchronous, as the server needs to get the feedback directly. Any ideas how top solve this, that it handles all incoming calls parallel and waits for the table is unlocked again?
Thank you for your help!
Hi,
thank you for your answer!
I have investigated something new yesterday:
I thought at the beginning, that the problem just occurs, when the system work processes are reached. The system has for example set up 15 dialog processes and the external server is calling the function 20 times in parallel. Then we normally need 5 dialog processes more. The system is taking then all 15 dialog processes and the locks got stucked.
That means, that I´ll maybe only get 4 or 5 uploads, which have really been updated the tables. All the others couldn´t get the table locked for their process.
But if I now let the server call the function just about 13 times in parallel, nearly all uploads have been updated the table!
From my point of view, the lock from SAP gets stucked, when the limit of dialog processes is reached. It´s not working in the right way anymore...
The same is happening, when you set up in the system, that only 10 work proecesses can be used by RFC. If I have more than 10, it´s going to be critical with the locks....
WEIRD!
Can anybody help me out of trouble?
Thank you!
Similar Messages
-
RFC calls with SAP JCO and IBM resource adapter for SAP - basic tuning
Hi experts,
we are working on a java portal connected to a backend system SAP by calling RFCs.
On our first integration tests, it appears to be quite slow fetching data from SAP by calling the remote functions from the custom portal. We are using SAP JCo 3.0.6 and IBM resource adapter for SAP 7.0.0.3 to integrate SAP with our portal.
Is there any basic tuning to achieve to improve performances or any hint of where to tune in SAP ?
Any help would be greatly appreciated.
Thanks a lot,
JamalHi Jamal,
I understand you have already checked performance issues in the SAP Server. We had some problems with certain RFC calls and it turned out to be a badly developed ABAP sentence.
I'd recommend you to use httpwatch or another tool to check the response times from the browser, so you can point accurately where the is.
Regards
Francisco -
Invoke MII Transaction thru RFC Call from SAP
Hi,
We want to get the data from Oracle DB table thru MII (12.0.2).
We need to use RFC call from SAP to MII.
Is it possible to invoke the MII transaction thru RFC by setting in Message Listener?
We have used iDoc messages but not tried with RFC.
How to do that?
Regards,
SenthilI feel MII doesn't have anything equivalent to RFC in ECC. You may try web services in an ABAP program
Hope the article below helps you
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9f101377-0c01-0010-269f-c3ee905d583b&overridelayout=true
Regards,
Musarrat -
Facing a problem with RFC Call receiver error while importing the table sap sandbox
Hi All,
I am trying to import a table from sap sand box . while importing it is showing below error..
RFC CallReceive error <Function DDIF_FIELDINFO_GET: RFC_ABAP_EXCEPTION-(Exception_Key: NOT_FOUND, No active nametab exists for /BIC/OHZ_ISP_SCX)[SAP NWRFC 720][SAP Partner 731 ][SCX][ics106046124][APOBODS][4103]>.
Please suggest me how can i overcome this problem ??Hi Kishore,
Can you quickly check with your SAP Basis Team whether they have installed necessary functions related to BODS on the SAP Application server.
Please check Supplement for SAP Guide
Regards
Arun Sasi -
Where does SAP do inserts to table SOFFPHF ?
Table SOFFPHF has data in the customer's system.
But when I do a "where-used" on this table, I only get back the two places
that I'm using it.
Where the heck is SAP doing updates to this table ?
I think that "where-used" doesn't find it because it's being accessed like this somewhere:
SELECT ... FROM ( filetab) ...
INSERT .... ( filetab) ....
etc.
But where does SAP insert into it?not needed - aRs answered the real question
-
Questions about the difference between RFC calls with and without JavaProxy
Hello,
I have a two questions:
1. Why is it more user-friendly to access SAP data in conjunction to plain JCo calls as explained here http://help.sap.com/saphelp_nw04/helpdata/en/79/c6213e225f9a0be10000000a114084/content.htm? Waht's exactly the reason for?
2. What's exactly the runtime shown in the picture here http://help.sap.com/saphelp_nw2004s/helpdata/en/ed/897483ea5011d6b2e800508b6b8a93/frameset.htm?
Regards,
ArminMoin Armin,
from what I understand from the first link, SAP is probably trying to say that it is user friendly because not everyone needs to be concerned regarding the actual JCo calls to the SAP backend. Rather they can simply work with the generated proxies as if they were actually working with the SAP Tables. The mapping, JCo calls and data transfer is taken care of by the Enterprise Connector.
For instance, you can generate proxies of the BAPIs on your side and let 10 users work with the structures and tables and when it is deployed, the JCo calls are automatically taken care of (from the SLD).
The figure in the second link just shows the runtime to illustrate that the native calls are hidden (again probably the same point I made before).
I am not sure, just my interpretation
Bye,
Sameer -
Hello,
how can I use authority check in a remote function call from another system?
The user is there not the real personalized user.
Thank you for help!
ChristineHi,
CALL FUNCTION 'AUTHORITY_CHECK'
EXPORTING
USER = LV_USER
OBJECT = lv_object
FIELD1 = lv_field
VALUE1 = LV_VALUE
field2 = space
value2 = space
field3 = space
value3 = space
EXCEPTIONS
USER_IS_AUTHORIZED = 0
USER_DONT_EXIST = 1
USER_IS_LOCKED = 1
USER_NOT_AUTHORIZED = 2.
Regards,
Arek
Reward points if useful -
UCWB - Consolidation Workbench - Lock table overflow
Hello,
This is w.r.t SEM BCS. We are in the initial phase of consolidation implementation. When I try to execute UCWB - Consolidation Workbench, system is giving an error with Message No. MC603
Lock table overflow
Diagnosis
This table overflowed when trying to enter SAP locks in the lock table.
System Response
The locks could not be set.
Procedure
Contact your system administrator. If this error occurs frequently, change the size of the profile parameter 'enque/table_size'. This parameter defines the size of the lock table in KByte
Request you kindly reply in this regard.
Regards
SreekanthHello Sreekanth
Have you implemented any note for this problem or adjusted the table parameters.I am also facing the same problem.Could you please let me know if there is any note which needs to be implemented.
thanks -
How can i debug a rfc being called from sap
hello Gurus,
We made a RFC call from SAP r3 to sap grc nfe......we did not receive any data in sap grc .......we go to SM58 and there it gives
the message "Name or password is incorrect (repeat logon)u201D.
How can i find out where the data has stuck.
Please help.
BR
HoneyHI,
please have a look at the link below..
this may help u !!!
[Re: how can i debug a rfc being called from .net connector (NCO) v2.0?;
Best of Luck !!1
Regards
Ravi -
'Classic' RFC library - password limited for rfc calls ?
Hi ,
we are using the 'classic' RFC library to connect to SAP for calling RFC function modules. Due to the fact that there are often older SAP systems involed, we use only passwords with 8 digits. But now we have the requirement to use passwords for the rfc user with more than 8 digits. According to my todays knowlede, the password is limited to 8 digits with the standard rfc lib.
Can the newer SAP NW RFC lib handle a password with more than 8 digits ?
But am i right that the SAPNW RFC lib is unable to handle rfc calls with opening a SAPGUI ?
thx
HeikeHi,
thank you for your answer!
I have investigated something new yesterday:
I thought at the beginning, that the problem just occurs, when the system work processes are reached. The system has for example set up 15 dialog processes and the external server is calling the function 20 times in parallel. Then we normally need 5 dialog processes more. The system is taking then all 15 dialog processes and the locks got stucked.
That means, that I´ll maybe only get 4 or 5 uploads, which have really been updated the tables. All the others couldn´t get the table locked for their process.
But if I now let the server call the function just about 13 times in parallel, nearly all uploads have been updated the table!
From my point of view, the lock from SAP gets stucked, when the limit of dialog processes is reached. It´s not working in the right way anymore...
The same is happening, when you set up in the system, that only 10 work proecesses can be used by RFC. If I have more than 10, it´s going to be critical with the locks....
WEIRD!
Can anybody help me out of trouble?
Thank you! -
RFC call results in StORAGE_PARAM_WRONG_SET
I'm in trouble with a RFC call, the process is as following: SAP system A calls a report. This report selects FI documents via LDB SDF. After user selects one or more documents from the list I call a RFC to read the payroll posting results from system B. The call of the RFC takes place for each FI document separatly what means user selects e.g. 10 FI documents, so I have 10 RFC calls with one result list. After each RFC call I add the result table of the RFC to the output table within the report. Before calling the RFC I of course clear all relevant tables again and additionaly I also use the 'FREE' statement within the RFC to set free all the memory, so there is no data stored in internal tables. But when the user selects a great no. of FI documents to read the payroll postings sometimes the RFC cancels in system B telling me that the storage parameters were set wrong. Calling the RFC step by step by selecting the FI document in single mode from the list I don't receive this dump. Do you have an idea what to do to avoid the dump? One problem: I don't have access to system B to test there, I only can do testing in system A and therefore I have no possibility to debugg this.
This is the code of the RFC module:
FUNCTION y_rfc_read_payroll_postings.
*"*"Local interface:
*" IMPORTING
*" VALUE(I_AWKEY) TYPE AWKEY
*" VALUE(I_CHECKNO) TYPE XFELD
*" VALUE(I_TAX) TYPE XFELD
*" EXPORTING
*" VALUE(E_PPDHD) TYPE PPDHD
*" TABLES
*" T_PPDIT STRUCTURE PPDIT
*" T_PPOIX STRUCTURE PPOIX
*" T_PPDIX STRUCTURE PPDIX
*" T_PAYR STRUCTURE PAYR OPTIONAL
*" T_HRPAY STRUCTURE PC209 OPTIONAL
*" T_REGUTA STRUCTURE REGUTA OPTIONAL
*" T_VALUES STRUCTURE YSHR_RFC_PAYROLL_POSTING OPTIONAL
*" T_CSKA STRUCTURE CSKA
*" RETURN STRUCTURE BAPIRET2
* local data
TYPE-POOLS: pptgs.
TYPES: BEGIN OF type_helpval,
pernr TYPE p_pernr,
lgart TYPE lgart,
rel TYPE xfeld,
END OF type_helpval.
TYPES: BEGIN OF type_cluster,
pernr TYPE p_pernr,
seqno TYPE cdseq,
abrj TYPE pnppabrj,
abrp TYPE pnppabrp,
actual TYPE srtza,
betrg TYPE ppoix-betrg,
waers TYPE ppoix-waers,
END OF type_cluster.
DATA: BEGIN OF lt_ppoix_key OCCURS 0,
pernr LIKE ppoix-pernr,
seqno LIKE ppoix-seqno,
actsign LIKE ppoix-actsign,
runid LIKE ppoix-runid,
postnum LIKE ppoix-postnum,
END OF lt_ppoix_key.
FIELD-SYMBOLS: <payroll> TYPE yshr_rfc_payroll_posting.
DATA ht_ppoix TYPE TABLE OF ppoix.
DATA productive_runs LIKE hrpp_pernr_runtab OCCURS 0 WITH HEADER LINE.
DATA t_rgdir TYPE TABLE OF pc261.
DATA wa_rgdir TYPE pc261.
DATA t_helpval TYPE TABLE OF type_helpval.
DATA t_cluster TYPE TABLE OF type_cluster.
DATA wa_helpval TYPE type_helpval.
DATA wa_cluster TYPE type_cluster.
DATA h_molga TYPE molga.
DATA h_ltext TYPE t5utz-ltext.
DATA wa_t512w TYPE t512w.
DATA wa_return TYPE bapiret2.
DATA par1 TYPE syst-msgv1.
DATA par2 TYPE syst-msgv2.
DATA par3 TYPE syst-msgv3.
DATA wa_ppoix TYPE ppoix.
FIELD-SYMBOLS: <wa_ppdit> TYPE ppdit.
DATA wa_ppdix TYPE ppdix.
DATA result_tab_us TYPE payus_result.
DATA result_tab_in TYPE payin_result.
DATA t_bt TYPE hrpay99_bt.
DATA t_rt TYPE hrpay99_rt.
DATA wa_bt TYPE pc209.
DATA wa_rt TYPE pc207.
DATA h_time(6) TYPE c.
DATA t_inter TYPE TABLE OF pay99_international WITH HEADER LINE.
DATA t_tax TYPE hrpayus_tax.
DATA wa_tax TYPE pc22t.
DATA wa_payr TYPE payr.
DATA wa_reguta TYPE reguta.
DATA wa_payroll TYPE yshr_rfc_payroll_posting.
DATA t_ppopx TYPE TABLE OF ppopx.
DATA wa_ppopx TYPE ppopx.
DATA wa_t001 TYPE t001.
FREE: t_ppdit, t_ppoix, t_ppdix, t_payr, t_hrpay, t_reguta,
t_values, t_helpval, t_cluster, t_ppopx.
* read general information
SELECT SINGLE * FROM ppdhd INTO e_ppdhd WHERE
docnum EQ i_awkey.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* get the company code and assign US flag
SELECT SINGLE * FROM t001 INTO wa_t001 WHERE
bukrs EQ e_ppdhd-bukrs.
* exit and set err. mess.
WHEN OTHERS.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'HR3PRNA'
number = '704'
* PAR1 = ' '
* PAR2 = ' '
* PAR3 = ' '
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPDHD'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
* read table PPDIT
SELECT * FROM ppdit INTO TABLE t_ppdit
FOR ALL ENTRIES IN t_cska
WHERE docnum = i_awkey AND
hkont = t_cska-kstar.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* exit and set err. mess.
WHEN OTHERS.
par1 = 'PPDIT'.
par2 = 'document'.
par3 = i_awkey.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = '5G'
number = '58'
par1 = par1
par2 = par2
par3 = par3
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPDIT'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
* read table PPDIX
SELECT * FROM ppdix INTO TABLE t_ppdix
FOR ALL ENTRIES IN t_ppdit
WHERE evtyp EQ e_ppdhd-evtyp AND
runid EQ e_ppdhd-runid AND
docnum EQ e_ppdhd-docnum AND
doclin = t_ppdit-doclin.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* exit and set err. mess.
WHEN OTHERS.
par1 = 'PPDIX'.
par2 = 'runid'.
par3 = e_ppdhd-runid.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = '5G'
number = '58'
par1 = par1
par2 = par2
par3 = par3
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPDIX'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
* read detail values on accounting level
SELECT * FROM ppoix INTO TABLE t_ppoix
FOR ALL ENTRIES IN t_ppdix WHERE
runid EQ t_ppdix-runid AND
tslin EQ t_ppdix-linum.
* read reposted documents from ppopx
SELECT * FROM ppopx INTO TABLE t_ppopx
FOR ALL ENTRIES IN t_ppdix WHERE
runid EQ t_ppdix-runid AND
tslin EQ t_ppdix-linum.
IF syst-subrc EQ 0.
* append corresponding lines to T_ppoix
LOOP AT t_ppopx INTO wa_ppopx.
MOVE-CORRESPONDING wa_ppopx TO productive_runs.
CLEAR productive_runs-runid.
COLLECT productive_runs.
ENDLOOP.
* get run table
CALL FUNCTION 'HR_EVAL_PROD_A_RUN_GET_TABLE'
TABLES
result_table = productive_runs.
LOOP AT productive_runs.
IF productive_runs-runid IS INITIAL.
DELETE productive_runs.
ENDIF.
ENDLOOP.
* fill ppoix-keys for needed ppoix
LOOP AT productive_runs.
LOOP AT t_ppopx INTO wa_ppopx.
IF wa_ppopx-pernr EQ productive_runs-pernr AND
wa_ppopx-seqno EQ productive_runs-seqno.
* built key
CLEAR lt_ppoix_key.
MOVE-CORRESPONDING productive_runs TO lt_ppoix_key.
lt_ppoix_key-postnum = wa_ppopx-postnum.
lt_ppoix_key-actsign = 'A'.
COLLECT lt_ppoix_key.
ENDIF.
ENDLOOP.
ENDLOOP.
* any values to append?
READ TABLE lt_ppoix_key INDEX 1.
IF syst-subrc EQ 0.
SELECT * FROM ppoix INTO TABLE ht_ppoix
FOR ALL ENTRIES IN lt_ppoix_key
WHERE pernr = lt_ppoix_key-pernr
AND seqno = lt_ppoix_key-seqno
AND actsign = 'A'
AND runid = lt_ppoix_key-runid
AND postnum = lt_ppoix_key-postnum.
IF syst-subrc EQ 0.
LOOP AT t_ppopx INTO wa_ppopx.
LOOP AT ht_ppoix INTO wa_ppoix WHERE
pernr EQ wa_ppopx-pernr AND
seqno EQ wa_ppopx-seqno AND
postnum EQ wa_ppopx-postnum.
MOVE-CORRESPONDING wa_ppopx TO wa_ppoix.
IF wa_ppoix-actsign <> 'A'.
wa_ppoix-betrg = - wa_ppoix-betrg.
wa_ppoix-anzhl = - wa_ppoix-anzhl.
ENDIF.
APPEND wa_ppoix TO t_ppoix.
DELETE ht_ppoix.
ENDLOOP.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
* check for any entries in table T_PPOIX
READ TABLE t_ppoix INTO wa_ppoix INDEX 1.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* exit and set err. mess.
WHEN OTHERS.
par1 = 'PPOIX'.
par2 = 'runid'.
par3 = e_ppdhd-runid.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = '5G'
number = '58'
par1 = par1
par2 = par2
par3 = par3
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPOIX'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
CHECK i_checkno EQ 'X' OR
i_tax EQ 'X'.
CLEAR t_values.
* read payroll results, determine values
LOOP AT t_ppdit ASSIGNING <wa_ppdit>.
LOOP AT t_ppdix INTO wa_ppdix WHERE
evtyp = e_ppdhd-evtyp AND
runid = e_ppdhd-runid AND
doclin = <wa_ppdit>-doclin.
LOOP AT t_ppoix INTO wa_ppoix WHERE
runid EQ e_ppdhd-runid AND
tslin EQ wa_ppdix-linum.
* append anywhere for checkno
IF i_checkno EQ 'X'.
wa_cluster-pernr = wa_ppoix-pernr.
wa_cluster-seqno = wa_ppoix-seqno.
wa_cluster-abrj = <wa_ppdit>-abper+0(4).
wa_cluster-abrp = <wa_ppdit>-abper+4(2).
wa_cluster-actual = wa_ppoix-actsign.
wa_cluster-betrg = wa_ppoix-betrg.
wa_cluster-waers = wa_ppoix-waers.
IF <wa_ppdit>-abper IS INITIAL.
* write BONDT into field ZUONR
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = wa_ppoix-pernr
TABLES
in_rgdir = t_rgdir.
READ TABLE t_rgdir INTO wa_rgdir WITH KEY
seqnr = wa_ppoix-seqno.
IF syst-subrc EQ 0.
<wa_ppdit>-zuonr+0(10) = wa_rgdir-bondt.
ENDIF.
ENDIF.
APPEND wa_cluster TO t_cluster.
ENDIF.
IF i_tax EQ 'X'.
* check if LGART is relevant
READ TABLE t_helpval INTO wa_helpval WITH KEY
pernr = wa_ppoix-pernr
lgart = wa_ppoix-lgart.
CASE syst-subrc.
WHEN 0.
* relevant or not
CASE wa_helpval-rel.
WHEN 'X'.
wa_cluster-pernr = wa_ppoix-pernr.
wa_cluster-seqno = wa_ppoix-seqno.
wa_cluster-abrj = <wa_ppdit>-abper+0(4).
wa_cluster-abrp = <wa_ppdit>-abper+4(2).
wa_cluster-actual = wa_ppoix-actsign.
wa_cluster-betrg = wa_ppoix-betrg.
wa_cluster-waers = wa_ppoix-waers.
IF <wa_ppdit>-abper IS INITIAL.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = wa_ppoix-pernr
TABLES
in_rgdir = t_rgdir.
READ TABLE t_rgdir INTO wa_rgdir WITH KEY
seqnr = wa_ppoix-seqno.
IF syst-subrc EQ 0.
<wa_ppdit>-zuonr+0(10) = wa_rgdir-bondt.
ENDIF.
ENDIF.
APPEND wa_cluster TO t_cluster.
* save values
MOVE-CORRESPONDING wa_ppoix TO wa_payroll.
wa_payroll-betrg = ABS( wa_payroll-betrg ).
APPEND wa_payroll TO t_values.
WHEN ' '.
CONTINUE.
ENDCASE.
WHEN OTHERS.
* determine values
CALL FUNCTION 'HR_COUNTRYGROUPING_GET'
EXPORTING
pernr = wa_ppoix-pernr
* TCLAS = 'A'
begda = e_ppdhd-bldat
endda = e_ppdhd-bldat
* WERKS =
IMPORTING
molga = h_molga
EXCEPTIONS
not_found = 1
OTHERS = 2
IF sy-subrc NE 0.
WRITE wa_ppoix-pernr TO par1.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'HRPAYBR94'
number = '278'
par1 = par1
IMPORTING
return = wa_return.
wa_return-field = wa_ppoix-pernr.
APPEND wa_return TO return.
CONTINUE.
ENDIF.
SELECT * FROM t512w INTO wa_t512w
WHERE molga = h_molga
AND lgart = wa_ppoix-lgart
AND endda GE e_ppdhd-bldat
AND begda LE e_ppdhd-bldat.
EXIT.
ENDSELECT.
IF syst-subrc EQ 0.
IF wa_t512w-vklas+77(1) = '2'.
wa_helpval-pernr = wa_ppoix-pernr.
wa_helpval-lgart = wa_ppoix-lgart.
wa_helpval-rel = 'X'.
APPEND wa_helpval TO t_helpval.
wa_cluster-pernr = wa_ppoix-pernr.
wa_cluster-seqno = wa_ppoix-seqno.
wa_cluster-abrj = <wa_ppdit>-abper+0(4).
wa_cluster-abrp = <wa_ppdit>-abper+4(2).
wa_cluster-actual = wa_ppoix-actsign.
wa_cluster-betrg = wa_ppoix-betrg.
wa_cluster-waers = wa_ppoix-waers.
IF <wa_ppdit>-abper IS INITIAL.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = wa_ppoix-pernr
TABLES
in_rgdir = t_rgdir.
READ TABLE t_rgdir INTO wa_rgdir WITH KEY
seqnr = wa_ppoix-seqno.
IF syst-subrc EQ 0.
<wa_ppdit>-zuonr+0(10) = wa_rgdir-bondt.
ENDIF.
ENDIF.
APPEND wa_cluster TO t_cluster.
MOVE-CORRESPONDING wa_ppoix TO wa_payroll.
wa_payroll-betrg = ABS( wa_payroll-betrg ).
APPEND wa_payroll TO t_values.
ELSE.
wa_helpval-pernr = wa_ppoix-pernr.
wa_helpval-lgart = wa_ppoix-lgart.
wa_helpval-rel = ''.
APPEND wa_helpval TO t_helpval.
ENDIF.
ENDIF.
ENDCASE.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDLOOP.
SORT t_cluster.
DELETE ADJACENT DUPLICATES FROM t_cluster.
LOOP AT t_cluster INTO wa_cluster.
CLEAR: result_tab_us, result_tab_in.
CASE wa_t001-land1.
WHEN 'US'.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
* CLUSTERID = 'RU'
employeenumber = wa_cluster-pernr
sequencenumber = wa_cluster-seqno
* READ_ONLY_BUFFER = ' '
* READ_ONLY_INTERNATIONAL = ' '
* ARC_GROUP = ' '
check_read_authority = ''
filter_cumulations = ''
* CLIENT =
* IMPORTING
* VERSION_NUMBER_PAYVN =
* VERSION_NUMBER_PCL2 =
CHANGING
payroll_result = result_tab_us
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10
WHEN OTHERS.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
* CLUSTERID = 'RU'
employeenumber = wa_cluster-pernr
sequencenumber = wa_cluster-seqno
* READ_ONLY_BUFFER = ' '
* READ_ONLY_INTERNATIONAL = ' '
* ARC_GROUP = ' '
check_read_authority = ''
filter_cumulations = ''
* CLIENT =
* IMPORTING
* VERSION_NUMBER_PAYVN =
* VERSION_NUMBER_PCL2 =
CHANGING
payroll_result = result_tab_in
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10
ENDCASE.
IF sy-subrc NE 0.
CLEAR wa_return.
wa_return-field = wa_ppoix-pernr.
CASE syst-subrc.
WHEN '1'.
wa_return-message = 'ILLEGAL_ISOCODE_OR_CLUSTERID'.
WHEN '2'.
wa_return-message = 'ERROR_GENERATING_IMPORT'.
WHEN '3'.
wa_return-message = 'IMPORT_MISMATCH_ERROR'.
WHEN '4'.
wa_return-message = 'SUBPOOL_DIR_FULL'.
WHEN '5'.
wa_return-message = 'NO_READ_AUTHORITY'.
WHEN '6'.
wa_return-message = 'NO_RECORD_FOUND'.
WHEN '7'.
wa_return-message = 'VERSIONS_DO_NOT_MATCH'.
WHEN '8'.
wa_return-message = 'ERROR_READING_ARCHIVE'.
WHEN '9'.
wa_return-message = 'ERROR_READING_RELID'.
WHEN OTHERS.
wa_return-message = 'OTHERS'.
ENDCASE.
APPEND wa_return TO return.
CONTINUE.
ELSE.
CASE wa_t001-land1.
WHEN 'US'.
t_inter = result_tab_us-inter.
WHEN OTHERS.
t_inter = result_tab_in-inter.
ENDCASE.
APPEND t_inter.
t_tax = result_tab_us-nat-tax.
LOOP AT t_inter.
t_bt = t_inter-bt.
t_rt = t_inter-rt.
ENDLOOP.
LOOP AT t_values ASSIGNING <payroll> WHERE
pernr EQ wa_cluster-pernr.
CLEAR wa_rt.
LOOP AT t_rt INTO wa_rt WHERE
lgart EQ <payroll>-lgart.
wa_rt-betrg = ABS( wa_rt-betrg ).
IF wa_rt-betrg EQ <payroll>-betrg AND NOT
wa_rt-cntr1 IS INITIAL.
IF wa_t001-land1 EQ 'US'.
LOOP AT t_tax INTO wa_tax WHERE
cntr1 EQ wa_rt-cntr1.
EXIT.
ENDLOOP.
IF syst-subrc EQ 0.
<payroll>-cntr1 = wa_tax-cntr1.
<payroll>-taxau = wa_tax-taxau.
* determine long text
SELECT SINGLE ltext FROM t5utz INTO h_ltext
WHERE taxau = wa_tax-taxau.
IF syst-subrc EQ 0.
<payroll>-ltext = h_ltext.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
* check table BT abd determine check no.
IF i_checkno EQ 'X'.
LOOP AT t_bt INTO wa_bt.
APPEND wa_bt TO t_hrpay.
CASE wa_bt-zlsch.
* check
WHEN 'C'.
SELECT * FROM payr INTO wa_payr WHERE
rzawe = 'C' AND
laufd = wa_bt-dtadt AND
pernr = wa_cluster-pernr AND
seqnr = wa_cluster-seqno AND
btznr = wa_bt-btznr.
EXIT.
ENDSELECT.
IF syst-subrc EQ 0.
* store period in a field to find correlation later
wa_payr-znme4+0(4) = wa_cluster-abrj.
wa_payr-znme4+4(2) = wa_cluster-abrp.
ELSE.
CLEAR wa_payr.
wa_payr-pernr = wa_cluster-pernr.
wa_payr-rwbtr = wa_cluster-betrg.
wa_payr-waers = wa_cluster-waers.
APPEND wa_payr TO t_payr.
ENDIF.
APPEND wa_payr TO t_payr.
* bank transfer
WHEN OTHERS.
h_time = wa_bt-dtati+0(5).
h_time+5(1) = 'P'.
SELECT * FROM reguta INTO wa_reguta WHERE
laufd = wa_bt-dtadt AND
laufi = h_time.
EXIT.
ENDSELECT.
IF syst-subrc EQ 0.
APPEND wa_reguta TO t_reguta.
ENDIF.
ENDCASE.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDFUNCTION.Hi Sudhir,
These settings need to be done by basis people. Anyhow, you can go to the tcode RZ11 and put in these parameters mentioned in the error message. There will be documentation available for these parameters. Try to see if the defaults are not met for any of these parameters. If you find something strange, report it to the basis. The documentations in this are very helpful. Hope this helps.
Thanks and Regards
Subray Hegde -
Assigning value returned from RFC call to a global variable
If I have an RFC call to SAP how can I assign the value returned to a global variable on my data services job?
Hi,
For now, it seems u haven't specified the destination properly. the call function statement must be suffixed with the 'destination' addition to make sure that the function call is an RFC and the particular function be executed at the desired destination. -
Hello everybody,
I would like to know how to log a RFC Call on SAP R/3 and the data flow from a RFC.
Thanks for your helps,Use t.code ST01 to activate RFC trace.
Use t.code ST11 to list the file of the trace. The file name should start with dev_rfc . ST11 is sorted by date so double click on the latest changed dev_rfc file.
Here where it gets kind of ugly.
Look for string ' **** Trace file opened at '
A few lines below that you'll find the data stream that was passed to and from SAP via a RFC. The human readable data is on the right side looking like this.
000000 05000000 05000331 00040000 00010331 .......1.......1
000010 03310004 00000002 03310503 00000503 .1.......1......
000020 05140010 C62F2556 F757D147 9D44C888 ....Æ/%V÷WÑG.DÈ.
000030 BB189C64 05140512 00000512 01300028 »..d.........0.(
000040 5341504C 5A48525F 50414E20 20202020 SAPLZHR_PAN
000050 20202020 20202020 20202020 20202020
000060 20202020 20202020 01300335 000C0000 .0.5....
000070 000A0000 00010000 00100335 03020008 ...........5....
000080 000000AB 00000010 03020304 00AB3132 ...«.........«12
000090 30373030 31313030 30313242 6C61636B 07001100012Black
0000a0 74686F72 6E652050 656E6E73 796C7661 thorne Pennsylva
0000b0 6E696120 20202020 20426C61 636B7468 nia Blackth
0000c0 6F726E65 20504120 20202020 20202020 orne PA
0000d0 20202020 20202034 32332053 2E204D61 423 S. Ma
0000e0 696E2053 742E2020 20202020 20202020 in St.
0000f0 20202020 20202020 20202020 20202031 1
000100 38383130 20202020 20417468 656E7320 8810 Athens
000110 20202020 20202020 20202020 20202020
000120 20205553 20504120 20202020 20202030 US PA 0
000130 30303030 33343634 35030403 0400AB31 000034645.....«1
000140 32303135 30313130 30303135 43415261 201501100015CARa
000150 64202020 20202020 20202020 20202020 d
000160 20202020 20202020 20204341 52616420 CARad
000170 20202020 20202020 20202020 20202020
000180 20202020 20202020 32363030 20566961 2600 Via
000190 20466F72 74756E61 2044722C 20537569 Fortuna Dr, Sui
0001a0 74652033 34302020 20202020 20202020 te 340
I hope this helps.
Mike V. -
Hello All,
I have a standard SAP BSP application(which is statefull, but does not have a script for handling WINDOW closing EVENT , for removing the orphaned sessions, also I cannot add that code now as it's standard).
In one of the bas page I'm calling an RFC function module to a second R/3 system.
When I call the RFC and after doing some processing if I close the application( Please note that underlying session is still active), I still can see the RFC Login in 2nd system.
Is there any way to remove the RFC connection immediately after the RFC call? so that there is no persistent RFC connection, and a connection will be established only on demand.
Regards
GeogyHi Geogy,
Please use the FM "RFC_CONNECTION_CLOSE" after the corresponding RFC call with the same destination.
This will close the connection opened by the previous call.
Thanks
Madhan -
Business Connector Connection with SAP
Hi!!!
I have a XML file with 3 fields with 100 records. I have in SAP a Z table with the same fields of the XML file.
I made the mapping in SAP BC Developer. I want to put the records of the XML in the Z table of SAP. How can I configure this to SAP BC connects with SAP and fill the table?
Thanks a lot for your help!
Regards!Hi,
This might help you
/people/bla.suranyi/blog/2006/07/10/xi--sap-business-connector-integration-using-the-http-adapter
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/96ed2129-0b01-0010-2e91-c45e1fad0d03
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a8424011-0d01-0010-e19d-e5bd8ca52244
Kumar.S
Maybe you are looking for
-
The item could not be found? Moved/renamed - TURN OFF?
So often I get this error message when using the Favorites panel in Adobe Bridge CS4: "The item could not be found. It may have been moved or renamed." Sometimes it's a misclick, sometimes I forget my external isn't plugged in and am clicking on a fo
-
How to display vendor bank key Invoice verification
Dear all: When I use t-code FB60, I got bank name from the display of vendor data. Is it possible to display vendor "bank key" instead of "bank name"? Thanks a lot.
-
Inheritance in Enumerations to provide subsets?
I know that there is no such thing as inheritance in enumerations, but I think it might be useful whenever the developer needs to define a subset relationship. E.g.: public enum A { V1, V2, V3, V4 public enum B extends A { V1, V2 Semantically, the de
-
Double-click in ALV grid should take to BSP application
Hi, In the portals, in an application, R/3 ALV grid is displayed. On double clicking one of the entries in the list, corresponding transaction in R/3 is opened and the details are displayed. Now, instead of opening the transaction in R/3, Correspondi
-
Hello; I have XP Pro SP2 with Acrobat Pro 8.1.0 I have received a form that is in PDF format. But I can't populate its fields. That is, when I try to type in the field, nothing happes. I have played around by going to Tools and checking the Form but