cancel
Showing results for 
Search instead for 
Did you mean: 

not getting data from BAPI

Former Member
0 Kudos

Iam passing mandatory param to BAPI and executing and i did everything in WebDynpro.

I am not getting data in the webdynpro table.

iam getting tha data with with Jco and i have data when i checked in R/3.

i double checked everything and did the same way with the other projects.

i used debugging but didn't get useful info like exceptions or anything, it's just executing tha BAPI and returs nothing.

what could be the problem?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI ,

I got it, if enter the date 01/01/2006, the date field in the webdynpro is taking 1/1/2006 but ABAP is accepting 10 digit format. i tried with 11/11/2006 and its working.

i have to include some code to make it as 10 digits.

Thanks guys, your help is appreciated.

Former Member
0 Kudos

HI,

I am executing the BAPI in controller with following code and binded the input data in the init.

public void executeZMM_VENDOR_COMMITMENT( )

{

//@@begin executeZMM_VENDOR_COMMITMENT()

try{

wdContext.currentZmm_Vendor_Commitment_InputElement().modelObject().execute();

wdContext.nodeZmm_Vendor_Commitment_Input().invalidate();

wdContext.nodeZmm_Vendor_Commitment_Input().nodeOutput().nodeVendcommit().invalidate();

}

catch(Exception e){

e.printStackTrace();

}

init:

Zmm_Vendor_Commitment_Input input = new Zmm_Vendor_Commitment_Input();

wdContext.nodeZmm_Vendor_Commitment_Input().bind(input);

i binded everything properly, i got the data for other bapi's with the same method.

please let me if i am wrong.

Thanks,

Damodhar.

Former Member
0 Kudos

Damodhar,

Try this:


public void executeZMM_VENDOR_COMMITMENT( )
{
  /*@@begin executeZMM_VENDOR_COMMITMENT()*/
  try
  {
    wdContext.currentZmm_Vendor_Commitment_InputElement()
      .modelObject().execute();

    wdContext.nodeZmm_Vendor_Commitment_Input().nodeOutput()
    .invalidate();
  }
  catch(Exception e)
  {
    e.printStackTrace();
  }
}

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi Damodhar,

Try to print your input parameters before executing the BAPI.

Or Run your WD Application in Debug mode and check whether you are getting your input parameters properly.

Then with the same input parameter,execute your Bapi in R/3 system and check whether the data is coming or not?

Have you binded all of your context nodes properly?

Regards,

Karthick

Former Member
0 Kudos

Hi Damodhar,

This is a common and simple mistake usually developers do.

You might have forgotten to link your context nodes.

check these things.

1.After execution of Bapi,you should not invalidating the model nodes.

2.Your model nodes may contain data,and you have to copy it to your value nodes using WDCopyService class(copyCorresponding() method).

3.As my assumption you are executing your Bapi in Component Controller,Now you have to check whether you are mapping your Component controllers context to View controllers context.And check whether all ui elements are bound with the appropriate context.

Check these things and let me know if you need more info.

Regards,

Karthick

Yashpal
Active Contributor
0 Kudos

Hi,

have u binded the model result node(which contain data result of execution ) with the model node of ur component controller . check mapping the nodes .

u have created a object of ur BAPIName eg.

ZBAPISALES info = new ZBAPISALES();

set the attributes of info means the data u want to pass

suppose in ur context controller there is a model node named

zsales and it contains all the node and attributes u want.

then bind the info to this node

wdContext.nodezsale().bind(info);

then execute the model.

if u have any query then post it write details about ur model nodes.......

Regards,

yashpal

Message was edited by: Yashpal Gupta