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

WBS Element in selection screen

Former Member
0 Likes
2,319

hi,

WBS Element in selection screen of the report need to be added from BSEG table of field PROJK.

requirement is

for eg- if you take a WBS Element suppose 11020017 and you put in BSEG table give the values as

BUKRS= 0010

GJAHR =2008

PROJK =11020017 it gives a message WBS Element 11020017 does not exist.

where as this WBS element if you insert in Function module CONVERSION_EXIT_ABPSP_OUTPUT

input as 11020017 , you will get output as 1000050-01.

and again goto BSEG table and give the values as

BUKRS= 0010

GJAHR =2008

PROJK =1000050-01, now u will get the value of WBS Element as 11020017 .

in the report the bussiness requires WBS Element in selection screen , the user gives the value of WBS Element in selection screen 11020017,it gives a message WBS Element 11020017 does not exist, the user should give this value1000050-01, but user doesnot know this value,user knows only 11020017 value.

now if the user gives in selection screen 11020017 it should work i mean it must convert to 1000050-01.

how to use function module in selection screen.help with code

thanks in advance

7 REPLIES 7
Read only

Former Member
0 Likes
1,528

AT SELECTION-SCREEN.

USE fm CONVERSION_EXIT_ABPSP_OUTPUT

Read only

Former Member
0 Likes
1,528

Hi

In the selection screen,you take the value.. then pass it to the Fm..conversion, then pass that value to the select statement from which u want to retreive the values...

parameters: v1(10).


conversion_exit_

input = v1

output = v2.


select......................... where projk = v2.

Regards,

Vishwa.

Read only

0 Likes
1,528

in the selection screen if we enter WBS ELEMENT as 11020017 and execute , its giving a message as

WBS Element 11020017 does not exist even though i kept the code as below

AT SELECTION-SCREEN ON s_projk.

if s_projk-low is not initial.

CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'

EXPORTING

INPUT = s_projk

IMPORTING

OUTPUT = s1_projk.

endif.

Read only

0 Likes
1,528

Hi

If u give select-options it will give an error...

if you give type as database table field..it will check in there..

Instead give...type c for the parameters.....

Regards,

Vishwa.

Read only

Former Member
0 Likes
1,528

Hi Sai latha,

My observations regarding WBS element in BSEG table are as follows.

the domain for PROJK (WBS ELEMENT) is PS_POSNR, which is having Data type NUMC 8 and output length of the same is 24.

So while you are preparing the selection screen dont use

tables: bseg.

select-options : s_projk for bseg-projk.

instead you can use

tables: bseg.

select-options: s_projk for bseg-belnr.

I think with this your problem will be get solved.

thanks & regards

Kishore M

Read only

Former Member
0 Likes
1,528

Hi Sai Latha,

We had asimilar problem, but not with selection screen.

In the selection screen of fields for selection for bseg table - the field used is PROJK in selection screen.

By pressing F4, displays the value as user knows.but internally it will be treated as the other one.

you can have the select stmnt as in selection options of projk.

if fails, in At selection-screen call the FM CONVERSION_EXIT_PROJ_INPUT

CONVERSION_EXIT_PROJ_OUTPUT(check which is working for u r requirement).

One more suggestion you can also debug the standard selection screen of Bseg table contents and see how data is converted and selected.

Hope this will be helpful.

Regards

Salini.

Read only

former_member585060
Active Contributor
0 Likes
1,528

Hi,

Use in following way, declare a parameter P_PROJK as character type, if you declare it as TYPE BSEG-PROJK system will defaultly check in dadabase table.

PARAMETERS : p_projk(10) TYPE c.

AT SELECTION-SCREEN.

CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'

EXPORTING

input = p_projk

IMPORTING

output = p_projk.

START-OF-SELECTION.

BREAK-POINT.

Regards

Bala Krishna