Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with a user exit PBAS0001 in ecc6

Former Member
0 Likes
741

HI Experts,

User exit works fine in 4.6c but it is not working fine in ecc6.

its stating that there is a problem with structure.

"I0028" and "INNNN" are not mutually convertible. In Unicode programs,

"I0028" must have the same structure layout as "INNNN", independent of

the length of a Unicode character.

We are using custom code for component EXIT_SAPFP50M_002 of user exit PBAS0001. where we used I0028 as p0028.

It worked fine in 4.6c but not working in ecc6. Can any one suggest how to rectify it.

Ravi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
686

Hi,

Please check the code below, hope this helps

tables: pa0000, pa0006, pa0001.

infotypes: 0001, 0000, 0006, 0041.

  • ---- Common data declarations...

DATA: W0000 LIKE P0000,

o0000 like p0000,

W0001 LIKE P0001,

o0001 like p0001,

w0006 like p0006, "new data in p0006

o0006 like p0006, "old data in psave

w0021 like p0021,

W0041 LIKE P0041,

o0041 like p0041,

w0105 like p0105,

o0105 like p0105,

w0167 like p0167,

w0168 like p0168,

w0169 like p0169,

w0170 like p0170.

data: wa_massn like pa0000-massn.

field-symbols: <w0000> type x.

field-symbols: <w0001> type x.

field-symbols: <w0006> type x.

field-symbols: <w0021> type x.

field-symbols: <w0041> type x.

field-symbols: <w0167> type x.

field-symbols: <w0168> type x.

field-symbols: <w0169> type x.

field-symbols: <w0170> type x.

field-symbols: <innnn> type x.

  • ---------------------------------------------------------------------*

  • ---- Make decision on what infotype has called this include as -----*

  • ---- all infotypes call this include in their module pools. -----*

  • ---------------------------------------------------------------------*

CASE INNNN-INFTY.

  • ---- START -- Actions infotype 0000

WHEN '0000'.

  • MOVE INNNN TO W0000.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0000 to <w0000> CASTING.

MOVE <innnn> TO <w0000>.

move psave to o0000.

INCLUDE ZHR0000C. "Validate Data Elements

  • ---- END -- Actions infotype 0000

  • ---- START -- Organizational Assignment infotype 0001

WHEN '0001'.

  • MOVE INNNN TO W0001.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0001 TO <w0001> CASTING.

MOVE <innnn> TO <w0001>.

MOVE psave TO o0001.

INCLUDE ZHR0001C. "Validate Data Elements

  • ---- END -- Organizational Assignment infotype 0001

  • ---- START -- Addresses Infotype 0006

when '0006'.

  • move INNNN to w0006.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0006 TO <w0006> CASTING.

MOVE <innnn> TO <w0006>.

  • move psave to o0006.

MOVE-CORRESPONDING psave TO o0006.

include zhr0006c. "Update payroll interface table zhrpr

  • ----END -- Address Infotype 0006

  • ---- START -- Family/Related Person Infotyp 0021

when '0021'.

  • move INNNN to w0021.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0021 TO <w0021> CASTING.

MOVE <innnn> TO <w0021>.

include zhr0021c. "Update payroll interface table zhrpr

  • ----END -- Family/Related Person Infotyp 0021

  • ---- START -- Infotyp 0041

when '0041'.

  • move INNNN to w0041.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0041 TO <w0041> CASTING.

MOVE <innnn> TO <w0041>.

move psave to o0041.

include zhr0041c.

  • ---- END -- Infotyp 0041

  • ---- START -- Health Plans Infotype 0167

when '0167'.

  • move INNNN to w0167.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0167 TO <w0167> CASTING.

MOVE <innnn> TO <w0167>.

include zhr0167c. "Update payroll interface table zhrpr

  • ----END -- Health Plans Infotype 0167

  • ---- START -- Insurance Plans Infotype 0168

when '0168'.

  • move INNNN to w0168.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0168 TO <w0168> CASTING.

MOVE <innnn> TO <w0168>.

include zhr0168c. "Update payroll interface table zhrpr

  • ----END -- Insurance Plans Infotype 0168

      • DELETE: Remedy NA00512331 -------------------- gb070607 -----------v

  • Removing 401K functionality....

  • ---- START -- Savings Plans Infotype 0169

*when '0169'.

  • move INNNN to w0169.

  • ASSIGN innnn TO <innnn> CASTING.

  • ASSIGN w0169 TO <w0169> CASTING.

  • MOVE <innnn> TO <w0169>.

  • include zhr0169c. "Update payroll interface table zhrpr

  • ----END -- Savings Plans Infotype 0169

      • DELETE: Remedy NA00512331 -------------------- gb070607 -----------^

  • ---- START -- Spending Accounts infotype 0170

WHEN '0170'.

  • MOVE INNNN TO W0170.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0170 TO <w0170> CASTING.

MOVE <innnn> TO <w0170>.

INCLUDE ZHR0170C. "Change End Date and update zhrpr

  • move w0170 to innnn.

MOVE <w0170> to <innnn>.

  • ---- END -- Spending Accounts infotype 0170

  • ---- START -- User id Infotype 0105

  • comment out due to On-Hold of prehire project. 10/04/2001

*when '0105'.

  • move INNNN to w0105.

  • move psave to o0105.

  • include zhr0105d.

  • ----END -- User ID Infotype 0105

ENDCASE.

Regards

Krishna

HI Experts,

User exit works fine in 4.6c but it is not working fine in ecc6.

its stating that there is a problem with structure.

"I0028" and "INNNN" are not mutually convertible. In Unicode programs,

"I0028" must have the same structure layout as "INNNN", independent of

the length of a Unicode character.

We are using custom code for component EXIT_SAPFP50M_002 of user exit PBAS0001. where we used I0028 as p0028.

It worked fine in 4.6c but not working in ecc6. Can any one suggest how to rectify it.

Ravi

3 REPLIES 3
Read only

Former Member
0 Likes
686

Hi Ravi,

This is an issue due to unicode conversion.

Check PBAS0001 PBO sample module from SMOD.

It gives a very good example on how to handle the infotype structures.

Cheers,

Aditya

Read only

Former Member
0 Likes
687

Hi,

Please check the code below, hope this helps

tables: pa0000, pa0006, pa0001.

infotypes: 0001, 0000, 0006, 0041.

  • ---- Common data declarations...

DATA: W0000 LIKE P0000,

o0000 like p0000,

W0001 LIKE P0001,

o0001 like p0001,

w0006 like p0006, "new data in p0006

o0006 like p0006, "old data in psave

w0021 like p0021,

W0041 LIKE P0041,

o0041 like p0041,

w0105 like p0105,

o0105 like p0105,

w0167 like p0167,

w0168 like p0168,

w0169 like p0169,

w0170 like p0170.

data: wa_massn like pa0000-massn.

field-symbols: <w0000> type x.

field-symbols: <w0001> type x.

field-symbols: <w0006> type x.

field-symbols: <w0021> type x.

field-symbols: <w0041> type x.

field-symbols: <w0167> type x.

field-symbols: <w0168> type x.

field-symbols: <w0169> type x.

field-symbols: <w0170> type x.

field-symbols: <innnn> type x.

  • ---------------------------------------------------------------------*

  • ---- Make decision on what infotype has called this include as -----*

  • ---- all infotypes call this include in their module pools. -----*

  • ---------------------------------------------------------------------*

CASE INNNN-INFTY.

  • ---- START -- Actions infotype 0000

WHEN '0000'.

  • MOVE INNNN TO W0000.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0000 to <w0000> CASTING.

MOVE <innnn> TO <w0000>.

move psave to o0000.

INCLUDE ZHR0000C. "Validate Data Elements

  • ---- END -- Actions infotype 0000

  • ---- START -- Organizational Assignment infotype 0001

WHEN '0001'.

  • MOVE INNNN TO W0001.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0001 TO <w0001> CASTING.

MOVE <innnn> TO <w0001>.

MOVE psave TO o0001.

INCLUDE ZHR0001C. "Validate Data Elements

  • ---- END -- Organizational Assignment infotype 0001

  • ---- START -- Addresses Infotype 0006

when '0006'.

  • move INNNN to w0006.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0006 TO <w0006> CASTING.

MOVE <innnn> TO <w0006>.

  • move psave to o0006.

MOVE-CORRESPONDING psave TO o0006.

include zhr0006c. "Update payroll interface table zhrpr

  • ----END -- Address Infotype 0006

  • ---- START -- Family/Related Person Infotyp 0021

when '0021'.

  • move INNNN to w0021.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0021 TO <w0021> CASTING.

MOVE <innnn> TO <w0021>.

include zhr0021c. "Update payroll interface table zhrpr

  • ----END -- Family/Related Person Infotyp 0021

  • ---- START -- Infotyp 0041

when '0041'.

  • move INNNN to w0041.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0041 TO <w0041> CASTING.

MOVE <innnn> TO <w0041>.

move psave to o0041.

include zhr0041c.

  • ---- END -- Infotyp 0041

  • ---- START -- Health Plans Infotype 0167

when '0167'.

  • move INNNN to w0167.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0167 TO <w0167> CASTING.

MOVE <innnn> TO <w0167>.

include zhr0167c. "Update payroll interface table zhrpr

  • ----END -- Health Plans Infotype 0167

  • ---- START -- Insurance Plans Infotype 0168

when '0168'.

  • move INNNN to w0168.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0168 TO <w0168> CASTING.

MOVE <innnn> TO <w0168>.

include zhr0168c. "Update payroll interface table zhrpr

  • ----END -- Insurance Plans Infotype 0168

      • DELETE: Remedy NA00512331 -------------------- gb070607 -----------v

  • Removing 401K functionality....

  • ---- START -- Savings Plans Infotype 0169

*when '0169'.

  • move INNNN to w0169.

  • ASSIGN innnn TO <innnn> CASTING.

  • ASSIGN w0169 TO <w0169> CASTING.

  • MOVE <innnn> TO <w0169>.

  • include zhr0169c. "Update payroll interface table zhrpr

  • ----END -- Savings Plans Infotype 0169

      • DELETE: Remedy NA00512331 -------------------- gb070607 -----------^

  • ---- START -- Spending Accounts infotype 0170

WHEN '0170'.

  • MOVE INNNN TO W0170.

ASSIGN innnn TO <innnn> CASTING.

ASSIGN w0170 TO <w0170> CASTING.

MOVE <innnn> TO <w0170>.

INCLUDE ZHR0170C. "Change End Date and update zhrpr

  • move w0170 to innnn.

MOVE <w0170> to <innnn>.

  • ---- END -- Spending Accounts infotype 0170

  • ---- START -- User id Infotype 0105

  • comment out due to On-Hold of prehire project. 10/04/2001

*when '0105'.

  • move INNNN to w0105.

  • move psave to o0105.

  • include zhr0105d.

  • ----END -- User ID Infotype 0105

ENDCASE.

Regards

Krishna

Read only

0 Likes
686

Hi Krishna,

Thanks a lot . it completely resolved my problem. Thanks a lot.