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

How i will get the subcode & paypoint?

Former Member
0 Likes
367

Hi,

Please help me for below logic.

IF RDSTDCover = 'ST' do the following:

If PA0001-BURKS='1009' go to Table

Z_PR_SOR_LegCoCode to retrieve previous Company Code Text for PA0002-PERID and send

the corresponding Sub Code according to ST Translation Table 2.

Else if no value is found Lookup

PA0001-BURKS along with Report Number '100525'

and send Sub Code value from ST Translation Table 1

Else, send blanks.

IF RDSTDCover = 'ST' do the following:

If PA0001-BURKS='1009' go to Table

Z_PR_SOR_LegCoCode to retrieve previous Company Code Text for

PA0002-PERID and send

the corresponding Paypoint according to ST Translation Table 2

Else if If no value is found Lookup

PA0001-BURKS along with Report Number '100525'

and send Payoint value from ST Translation Table 1

Else, send blanks.

ST Translation table 1 :(z_tran1_subcode)

this table is having the folling fields.

-


Reportnumber | companycodetext| p0001-bukrs | subcode | paypoint

100525 | ALP | 1044 | 0002 | 0001

100525 | JAY | 1032 | 0006 | 0001

100525 | APL | 1099 | 0006 | 0001

ST Translation table 2:(z_tran2_subcode)

-


Reportnumber| companycodetext| subcode | paypoint

100525 | ABH | 0007 | 0002

100525 | API | 0008 | 0005

I was coded like this to get the company code text.But how i will get the subcode and paypoint.

if w_MetLife_detail-rdstdcover = c_st.

if p0001-bukrs = '1009'.

select single ZBUKRS_TEXT from ZGTPA_TL_SSNHIST into l_ZBUKRS_TEXT where perid = w0002-perid.

Please help me.

Regards,

Sujan

1 REPLY 1
Read only

Former Member
0 Likes
291

Hello,

You will have to perform a join on the table ST1 and ST2 as follows

IF RDSTDCover = 'ST' do the following:

If PA0001-BURKS='1009' go to Table

Z_PR_SOR_LegCoCode to retrieve previous Company Code Text for PA0002-PERID and send

the corresponding Sub Code according to ST Translation Table 2.

Else if no value is found Lookup

PA0001-BURKS along with Report Number '100525'

and send Sub Code value from ST Translation Table 1

Else, send blanks.

IF RDSTDCover = 'ST' do the following:

If PA0001-BURKS='1009' go to Table

Z_PR_SOR_LegCoCode to retrieve previous Company Code Text for

PA0002-PERID and send

the corresponding Paypoint according to ST Translation Table 2

Else if If no value is found Lookup



select subcode paypoint
from ST1 as a inner join st2 as b
on a~reportnumber = b~reportnumber and
     a~companycodetext = b~companycodetext
where a~bukrs = PA0001-bukrs and
           a~reportnumber = '100525'.

PA0001-BURKS along with Report Number '100525'

and send Payoint value from ST Translation Table 1

Else, send blanks.

Regards,

Mansi.