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

Error in code like...

Hi,

I have errior of java,.null pointer ...at following codes.

public void onActiontoSubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActiontoSubmit(ServerEvent)

IWDMessageManager Manager = wdComponentAPI.getMessageManager();

try

{

wdContext.currentRequisition_ItemsElement().setPreq_Item(wdContext.currentRequisition_ItemsElement().getPreq_Item());

wdContext.currentRequisition_ItemsElement().setDoc_Type(wdContext.currentRequisition_ItemsElement().getDoc_Type());

wdContext.currentRequisition_ItemsElement().setDeliv_Date(wdContext.currentRequisition_ItemsElement().getDeliv_Date());

wdContext.currentRequisition_ItemsElement().setMaterial(wdContext.currentRequisition_ItemsElement().getMaterial());

wdContext.currentRequisition_ItemsElement().setPlant(wdContext.currentRequisition_ItemsElement().getPlant());

wdContext.currentRequisition_ItemsElement().setQuantity(wdContext.currentRequisition_ItemsElement().getQuantity()

wdContext.currentBapi_Requisition_Create_InputElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

}

catch(WDDynamicRFCExecuteException ce){

Manager.reportException(ce.getMessage(), false);

Please help me ..help will be rewarded.

Gurprit Bhatia

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 11:18 AM

    hi,

    wdContext.currentRequisition_ItemsElement()

    What is the cardinality of the node Requisition_Items.

    if its not 1..n then create an element and then access this.

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 11:49 AM

    Hi,

    Code looks like u r trying to execute some model. If it is so, check if all the input u r passing is not null. Print and Chcek. After exceuting, check if response is generated successfully. If u need more help, reply.

    Regards,

    Harini S

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 02:22 PM

    u need to initialize currentRequisition_ItemsElement in the wdDoInit() and bind to the context node.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 22, 2007 at 06:19 AM

    Hi ,

    (1)Requisition_Items is not getting populated before you use it.

    (2) set collection cardinality for Requisition_Items to 1:1 or 1:n

    Regards,

    Praveen

    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.