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

challange

Former Member
0 Likes
1,094

Please use a meanginful subject in future

Hi frnds,

My requirement is In FB50 tcode after entering Personnel No, Costcenter should come automatically.

For that I am using BADI FAGL_DERIVE_SEGMENT and user exit on FI validation side as well:

My code is

*----


DATA: GT_PA0001 type PA0001.

SELECT SINGLE * FROM PA0001 INTO GT_PA0001

WHERE PERNR = I_COBL-PERNR

AND KOSTL NE ''.

I_COBL-KOSTL = GT_PA0001-KOSTL.

*----


But it is not picking cost Center value. In debug I can see the value in I_COBL-KOSTL.

Is thare any alternative option are thare.

Edited by: Matt on Jun 1, 2009 2:48 PM

Please use a meanginful subject in future

Hi frnds,

My requirement is In FB50 tcode after entering Personnel No, Costcenter should come automatically.

For that I am using BADI FAGL_DERIVE_SEGMENT and user exit on FI validation side as well:

My code is

*----


DATA: GT_PA0001 type PA0001.

SELECT SINGLE * FROM PA0001 INTO GT_PA0001

WHERE PERNR = I_COBL-PERNR

AND KOSTL NE ''.

I_COBL-KOSTL = GT_PA0001-KOSTL.

*----


But it is not picking cost Center value. In debug I can see the value in I_COBL-KOSTL.

Is thare any alternative option are thare.

Edited by: Matt on Jun 1, 2009 2:48 PM

6 REPLIES 6
Read only

Former Member
0 Likes
1,052

hai

see the below code.

loop at i_cobl into wa_cobl.

penr = wa_cobl-pernr.

endloop.

now write the queri ok

i think this may work

Read only

0 Likes
1,052

Dear Asif;

I think u didn't get my question. I am seeing the value in the debugging mode and on the screen i didn't see that value which i saw in the debugging mode. I also tried with the Set Parameter ID option but didn't found the desired result.

Read only

Former Member
0 Likes
1,052

Dear Mr.Mohsin,

Your code is correct, but you need to use the Modify screen option at runtim once the Personnel number is keyed in...

Write your code within the LOOP at Screen and MODIFY SCREEN . ENDLOOP

*----


DATA: GT_PA0001 type PA0001.

SELECT SINGLE * FROM PA0001 INTO GT_PA0001

WHERE PERNR = I_COBL-PERNR

AND KOSTL NE ''.

I_COBL-KOSTL = GT_PA0001-KOSTL.

*----


Regards,

Mohammed Anwar

Read only

matt
Active Contributor
0 Likes
1,052

Please use a meanginful subject in future

Read only

Former Member
0 Likes
1,052

Hi,

I_COBL-KOSTL is not a changing parameter in this BAdI, The only changing parameter is 'E_SEGMENT'. You can only change this particular field.

Read only

Former Member
0 Likes
1,052

Hi,

I think you can try with the BADI FAGL_SET_SEGMENT where you changing parameter CT_ACCIT where you can change.

Thanks,

Shailaja Ainala.