Skip to Content
avatar image
Former Member

Need to call a field from other BAPI..

Hi All,

I have 2 BAPIS : BAPI 'ABC' and BAPI 'XYZ'.

I have 2 Views: 'abc' and 'xyz' view.

Now, I have XYZ bapi in xyz View and ABC bapi in abc View. I want to use a field of XYZ bapi inside abc view. How to call it?

I have tried doing this but it failed, I had called XYZ bapi in abc view's context and used the field. But all the time, it shows the same value becuse the bapi execution is done in xyz View.

Please help.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 15, 2009 at 08:43 AM

    Hi,

    First map both views context to component controller, so that u can use the field in two views.

    u can use that filed in abc view also.

    Regards,

    Sunaina Reddy T

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sarbjeet Singh

      Hi All,

      The issue is solved.

      This was happening because the value was not getting saved in the backend for that Bapi. Now they have rectified that, and the field is showing proper values.

      Thanks mainly to SARBJEET for helping anyways.

      Regards,

      Nikesh Shah

  • avatar image
    Former Member
    Jul 14, 2009 at 01:40 PM

    Hello,

    you have to map the field in the context.

    Have a context in view xyz-field_a and bind it to the context of the controller xyz-field_a

    The same you do in view abc. create a field in the context xyz-field_a and bind it to the controller xyz-field_a

    So if you are calling BAPI XYZ in view xyz, add the value to the ...currentcontext....

    Then switch to view abc and you will find the value of xyz in abc.

    Hope this is not too confusing.

    Best regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Uwe,

      Sorry to say, but this is confusing. The field of XYZ bapi in xyz view is already bined to the Controller. I am not getting the exact solution. Can you please elaborate more..or else just try to put some code.

      Thanks.

  • Jul 14, 2009 at 02:01 PM

    Hi Nikesh,

    are you going from xyz view to abc view.

    beacuse if xyz is your first view then you will execute the bapi in that and when you will go to abc view new value of the field will be there.

    but if abc is your first view and xyz is your second view than you need to execute xyz abpi in abc view also to get the correct value of the mapped field.

    thanks

    sarb

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sarbjeet Singh

      Hi Sarbjeet,

      Can you please give me your email id? So that I can send you the code and also the project.

      Regards,

      Nikesh Shah