Skip to Content
author's profile photo Former Member
Former Member

Get Input Parameters BAPI

Hi,

In my Component Controller > Implementation >

in the method executeBapi_MYBAPI_Input( )

i write this code:

String s_nom_deb = "BT*"
			String s_nom_fin = "BV*"
			
			nom_deb.setUname(s_nom_deb);  
			nom_fin.setUname(s_nom_fin);
			
			wdContext.currentBapi_MYBAPI_InputElement().modelObject().setNom_Start(nom_deb);
			wdContext.currentBapi_MYBAPI_InputElement().modelObject().setNom_End(nom_fin);
			
			wdContext
				.currentBapi_MYBAPI_InputElement()
				.modelObject()
				.execute();
				
			wdContext.nodeOutput().invalidate();

and IT WORKS.

but i want value "BT" and "BV" became from inputfield,

but when i replace by:

wdContext.nodeNom_Start().currentNom_StartElement().getUname();

and wdContext.nodeNom_End().currentNom_EndElement().getUname();

it doesn't work.

how can i retrieve the value from my 2 inputfields ?

what sould i verifie in "mapping" ?

Regards,

Phoenix

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2007 at 10:54 AM

    Hi ,

    Take two value attributes of type string and map them to ur input fileds.

    now ur code will be,

    nom_deb.setUname(wdcontext.currentcontextelement.getS_nom_deb);

    nom_fin.setUname(wdcontext.currentcontextelement.getS_nom_fin);

    and try to execute the BAPI.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2007 at 01:26 PM

    Hi phoenix leo ,

    Declare all ur value attrobutes and then map them to the Views. Now try accessing the elements.

    Regards,

    Jhansi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2007 at 11:29 AM

    Hi Phoenix,

    Declare two value attributes (ex: a and b) and map them to your input fields.

    Now get the values of input fields:

    String s_nom_deb = wdContext.currentContextElement().getA();

    String s_nom_fin = wdContext.currentContextElement().getB();

    Now set them to

    wdContext.currentBapi_MYBAPI_InputElement().setNom_Start(s_nom_deb); wdContext.currentBapi_MYBAPI_InputElement().setNom_End(s_nom_fin);

    and call <b>executeBapi_MYBAPI_Input( )

    </b> method.

    And dont put the code executeBapi_MYBAPI_Input( ) method put it in Button action or where ever you want.

    Regards,

    Jhansi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2007 at 01:01 PM

    Declare two value attributes binding with input field and those are like variables one and two

    simply u can add like this.

    wdContext.currentBapi_MYBAPI_InputElement().modelObject().setNom_Start(wdContext.currentContextelement.getOne());

    wdContext.currentBapi_MYBAPI_InputElement().modelObject().setNom_End(wdContext.currentContextelement.getTwo());

    it might helps you.

    Thanks,

    Lohi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 03:22 PM

    upper/lower case problem which cause errors in BAPI execution (from the beginning, model mapping/binding, context mapping was good)

    Message was edited by:

    phoenix leo

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.