cancel
Showing results for 
Search instead for 
Did you mean: 

Want To Change the Case Of INPUT FIELDS Values

Dheerendra
Participant
0 Kudos

Hi....

I Bind My Two Input-Fields in a View To The BAPI From the Back-End But My Bapi only Execute/Show me Result When User Enter The Code/Group(Input Fields Values) in Upper-Case, But I want That Either User Enter the Values in Lower-Case or Upper-Case That Bapi Must Be Run..........So I Write JAVA Code In The wdDoinit() method of Custom Controller as Follows

public void wdDoInit()

{

//@@begin wdDoInit()

try{

Bapi_Po_Getitemsrel_Input zinp = new Bapi_Po_Getitemsrel_Input();

wdContext.nodeBapi_Po_Getitemsrel_Input().bind(zinp);

String R_Code = (WDWebContextAdapter.getWebContextAdapter().getRequestParameter("Rel_cat_inptfd"));

String R_Group = (WDWebContextAdapter.getWebContextAdapter().getRequestParameter("Rel_cd_inptfd"));

try{

if(R_Code!=null ||(!R_Code.equals(""))){

String s1 = R_Code.toUpperCase();

zinp.setRel_Code(s1);

}

if(R_Group!=null ||(!R_Group.equals(""))){

String s2 = R_Group.toUpperCase();

zinp.setRel_Group(s2);

}

}catch(Exception ex)

{ex.printStackTrace();}

//@end

}

But It Does't Work .....First it Throws Null-Pointer Exception but After making all validation for null- pointer it does not shoe me desired result.....I GOT TOOOOO MUCH PUZZLED ..............PLZ HELP ME....................:-(

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

go to your action handler where the BAPI is executed and access the context attributes which hold the parameters of your BAPI model. Then you can transfer the values to upper case. The wdDoInit() seems to be not the right place to do this modification.

If you have further questions...post them here.

regards

Sebastian

Former Member
0 Kudos

Hi Sukal,

you can write Any case(upper and lower case) in BAPI then much easy to do these all things.

Otherwise EmptyField value must be write in else part only then it works.

Thanks

nageswara

Dheerendra
Participant
0 Kudos

Thanks Mr. Voss... Your Suggestion Solves My Problem..as i am Java Developer and New To This Web Dynpro tool, but i got suceeded to overcome this problem...many..many thank's to you...Also i have a problem abt multiple selection from a out-put table, If U have a solution for that i will also thankful to U.......

Byeee:-)

Looking 4 ur help in future

Thank's & Regard's

Dheerendra K. Shukla

dheerendra.shukla@jktech.com

+91-9891089197

Answers (0)