cancel
Showing results for 
Search instead for 
Did you mean: 

Abap Proxy ( XI ) File ...

Former Member
0 Kudos

here is my proxy generated..

Class ZRCO_MI_EMP_DET_OB ---> Proxy Class

Structure ZRDT_EMP_DET_OB ---> Proxy Structure

Structure ZRDT_EMP_DET_OB_EMPLOYEE ---> Proxy Structure

Structure ZRMT_EMP_DET_OB ---> Proxy Structure

Table Type ZRDT_EMP_DET_OB_EMPLOYEE_TAB ---> Proxy Table Type

And se38 Code is

-


>

REPORT ZTEST_PROXY.

TABLES:

PA0001.

DATA:

PRXY TYPE REF TO ZRCO_MI_EMP_DET_OB,

FS_EMPLOYEE TYPE ZRDT_EMP_DET_OB_EMPLOYEE,

T_EMPLOYEE TYPE ZRDT_EMP_DET_OB_EMPLOYEE_TAB,

FS_EMPLOYEE_MT TYPE ZRMT_EMP_DET_OB.

DATA:

BEGIN OF I_PA0000 OCCURS 0,

PERNR LIKE PA0000-PERNR,

MASSN LIKE PA0000-MASSN,

END OF I_PA0000,

BEGIN OF I_PA0001 OCCURS 0,

PERNR LIKE PA0000-PERNR,

WERKS LIKE PA0001-WERKS, " Personnel Area

PERSG LIKE PA0001-PERSG, " Employee Group

PERSK LIKE PA0001-PERSK, " Employee Subgroup

BTRTL LIKE PA0001-BTRTL, " Personnel Subarea

ABKRS LIKE PA0001-ABKRS, " Payroll Area

KOSTL LIKE PA0001-KOSTL, " Cost Center

ORGEH LIKE PA0001-ORGEH, " Organizational Unit

PLANS LIKE PA0001-PLANS, " Position

END OF I_PA0001,

BEGIN OF I_PA0002 OCCURS 0,

PERNR LIKE PA0000-PERNR,

NACHN LIKE PA0002-NACHN, " Last Name

VORNA LIKE PA0002-VORNA, " First Name

GESCH LIKE PA0002-GESCH, " Gender Key

GBDAT LIKE PA0002-GBDAT, " Date of Birth

END OF I_PA0002,

BEGIN OF I_PA0007 OCCURS 0,

PERNR LIKE PA0000-PERNR,

SCHKZ LIKE PA0007-SCHKZ, " Work Schedule Rule

ARBST LIKE PA0007-ARBST, " Daily Working Hours

END OF I_PA0007,

BEGIN OF I_PA0008 OCCURS 0,

PERNR LIKE PA0000-PERNR,

TRFAR LIKE PA0008-TRFAR, " Pay scale type

TRFGB LIKE PA0008-TRFGB, " Pay Scale Area

TRFGR LIKE PA0008-TRFGR, " Pay Scale Group

TRFST LIKE PA0008-TRFST, " Pay Scale Level

STVOR LIKE PA0008-STVOR, " Date of Next Increase

WAERS LIKE PA0008-WAERS, " Currency Key

ANSAL LIKE PA0008-ANSAL, " Annual salary

LGA01 LIKE PA0008-LGA01, " Wage Type

BET01 LIKE PA0008-BET01, " Wage Type Amount for Payments

ANZ01 LIKE PA0008-ANZ01, " Number

LGA02 LIKE PA0008-LGA02, " Wage Type

BET02 LIKE PA0008-BET02, " Wage Type Amount for Payments

ANZ02 LIKE PA0008-ANZ02, " Number

LGA03 LIKE PA0008-LGA03, " Wage Type

BET03 LIKE PA0008-BET03, " Wage Type Amount for Payments

ANZ03 LIKE PA0008-ANZ03, " Number

END OF I_PA0008,

BEGIN OF I_PA0009 OCCURS 0,

PERNR LIKE PA0000-PERNR,

ZLSCH LIKE PA0009-ZLSCH, " Payment Method

BANKS LIKE PA0009-BANKS, " Bank country key

BANKL LIKE PA0009-BANKL, " Bank Keys

BANKN LIKE PA0009-BANKN, " Bank account number

BKONT LIKE PA0009-BKONT, " Bank Control Key

END OF I_PA0009.

TRY.

CREATE OBJECT PRXY.

ENDTRY.

SELECT-OPTIONS:

S_PERNR FOR PA0001-PERNR.

START-OF-SELECTION.

SELECT PERNR " Personnel number

MASSN

FROM PA0000

INTO TABLE I_PA0000

WHERE PERNR IN S_PERNR

AND ENDDA GE SY-DATUM

AND BEGDA LE SY-DATUM

AND STAT2 EQ '3'.

SELECT PERNR " Personnel number

WERKS " Personnel Area

PERSG " Employee Group

PERSK " Employee Subgroup

BTRTL " Personnel Subarea

ABKRS " Payroll Area

KOSTL " Cost Center

ORGEH " Organizational Unit

PLANS " Position

FROM PA0001

INTO TABLE I_PA0001

WHERE PERNR IN S_PERNR

AND ENDDA GE SY-DATUM

AND BEGDA LE SY-DATUM.

SELECT PERNR " Personnel number

NACHN " Last Name

VORNA " First Name

GESCH " Gender Key

GBDAT " Date of Birth

FROM PA0002

INTO TABLE I_PA0002

WHERE PERNR IN S_PERNR

AND ENDDA GE SY-DATUM

AND BEGDA LE SY-DATUM.

SELECT PERNR " Personnel number

SCHKZ " Work Schedule Rule

ARBST " Daily Working Hours

FROM PA0007

INTO TABLE I_PA0007

WHERE PERNR IN S_PERNR

AND ENDDA GE SY-DATUM

AND BEGDA LE SY-DATUM.

SELECT PERNR " Personnel number

TRFAR " Pay scale type

TRFGB " Pay Scale Area

TRFGR " Pay Scale Group

TRFST " Pay Scale Level

STVOR " Date of Next Increase

WAERS " Currency Key

ANSAL " Annual salary

LGA01 " Wage Type

BET01 " Wage Type Amount for Payments

ANZ01 " Number

LGA02 " Wage Type

BET02 " Wage Type Amount for Payments

ANZ02 " Number

LGA03 " Wage Type

BET03 " Wage Type Amount for Payments

ANZ03 " Number

FROM PA0008

INTO TABLE I_PA0008

WHERE PERNR IN S_PERNR

AND ENDDA GE SY-DATUM

AND BEGDA LE SY-DATUM.

SELECT PERNR " Personnel number

ZLSCH " Payment Method

BANKS " Bank country key

BANKL " Bank Keys

BANKN " Bank account number

BKONT " Bank Control Key

FROM PA0009

INTO TABLE I_PA0009

WHERE PERNR IN S_PERNR

AND ENDDA GE SY-DATUM

AND BEGDA LE SY-DATUM.

SORT: I_PA0000 BY PERNR,

I_PA0001 BY PERNR,

I_PA0002 BY PERNR,

I_PA0007 BY PERNR,

I_PA0008 BY PERNR.

REFRESH T_EMPLOYEE.

LOOP AT I_PA0000.

CLEAR FS_EMPLOYEE.

FS_EMPLOYEE-PERSONNEL_ID = I_PA0000-PERNR.

FS_EMPLOYEE-ACTION_TYPE = I_PA0000-MASSN.

READ TABLE I_PA0001 WITH KEY PERNR = I_PA0000-PERNR BINARY SEARCH.

IF SY-SUBRC EQ 0.

FS_EMPLOYEE-EMPLOYEE_GROUP = I_PA0001-PERSG.

FS_EMPLOYEE-EMPLOYEE_SUB_GROUP = I_PA0001-PERSK.

FS_EMPLOYEE-PERSONNEL_SUB_AREA = I_PA0001-BTRTL.

FS_EMPLOYEE-PAYROLL_AREA = I_PA0001-ABKRS.

FS_EMPLOYEE-COST_CENTER = I_PA0001-KOSTL.

FS_EMPLOYEE-POSITION = I_PA0001-PLANS.

ENDIF.

READ TABLE I_PA0002 WITH KEY PERNR = I_PA0000-PERNR BINARY SEARCH.

IF SY-SUBRC EQ 0.

FS_EMPLOYEE-LAST_NAME = I_PA0002-NACHN.

FS_EMPLOYEE-FIRST_NAME = I_PA0002-VORNA.

FS_EMPLOYEE-GENDER = I_PA0002-GESCH.

FS_EMPLOYEE-DOB = I_PA0002-GBDAT.

ENDIF.

READ TABLE I_PA0007 WITH KEY PERNR = I_PA0000-PERNR BINARY SEARCH.

IF SY-SUBRC EQ 0.

ENDIF.

READ TABLE I_PA0008 WITH KEY PERNR = I_PA0000-PERNR BINARY SEARCH.

READ TABLE I_PA0009 WITH KEY PERNR = I_PA0000-PERNR BINARY SEARCH.

APPEND FS_EMPLOYEE TO T_EMPLOYEE.

ENDLOOP.

TRY.

FS_EMPLOYEE_MT-MT_EMP_DET_OB-EMPLOYEE = T_EMPLOYEE.

CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS

EXPORTING

OUTPUT = FS_EMPLOYEE_MT.

COMMIT WORK

.

CATCH CX_AI_SYSTEM_FAULT .

DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .

CREATE OBJECT FAULT.

WRITE 😕 FAULT->ERRORTEXT.

ENDTRY.

-


>

And IR and ID configured properly.

But it is not posting data from SAP to File ..through XI.

No Message in SXMB_MONI..

Any advices Pls..

Regards,

Ramesh.

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

1. check SXMB_MONI. in ERP

2. register queues in ERP (and do all the steps to connect business system with PI from config guide)

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal ,

Thanks for reply..

1. check SXMB_MONI. in ERP

-->No Messages available

2. register queues in ERP (and do all the steps to connect business system with PI from config guide)

I have done all needed configuration..I followed this blog to activate proxies..

/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies

And SLD connections done. Idoc and RFC scenarios working fine from same system.

queues, I am not aware of ..Is it Mandatory for this scenario.

If so, pls tell me, how to do so..

Regards,

Ramesh.

Former Member
0 Kudos

Ramesh,

Run transaction SM58 on ERP and check if messages are stuck in TRFC. You can see error messages as well here. Take out Username while running transaction.

Hope this will help.

Thanks,

NIlesh

Former Member
0 Kudos

Hi Nilesh,

There are some Messages in sm58,But those are not related to our scenarios.

Some other connection errors are there.

Any input regarding Queues.

regards,

Ramesh.

Former Member
0 Kudos

If you double click on Queues you can see all stuck messages. Clear all queues. if running in dev / qa and if messages are not req. anymore you can delete them and re-run your interface.

Thanks,

Nilesh

Former Member
0 Kudos

Ramesh,

Yes true the messages from different interface can make sometimes problem to the interface you are working around,just make sure that the messages of the other interfaces are not used anywhere and you can delete them if required which will automatically allow your message to post.

Thanks and Regards

Sudharshan

Answers (0)