cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass Null value to BAPI

Former Member
0 Kudos

Hi Experts,

There is backend table value

1- task in process

2-task completed

- New task

For new task it is in blank value(null value). This is Standard SAP table.I binded moder attribute as simpletype for dropdownbykey.if i pass null its giving null pointer exception before executing BAPI

Regards,

Manivannan P

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Helo Manivannan,

try this:

setAttributeValue(<name_of_context_attribute>, null);

I think if RFC import parameter is not optional, it should be set to null explicitly.

Best regards,

Chinnu

Former Member
0 Kudos

Hi,

You can do either way, like you can do it from R/3 side or with Portal side. But logic is same. In both way you have to use loop statement to suppress null to space.

If you do this at R/3 side,

then before return data you have to suppress null to empty space.

If you do this at Webdynpro side,

then dont bind BAPI ourput context directly, rather use some intermediate context, and map those context to drop down key. Each time, when BAPI calls, a loop has to be used to remove null to empty space then assign BAPI result to intermediate context.

and this will solve your issue.

Regards!

Sheik

Former Member
0 Kudos

Hi experts,

It worked data passing through reference node

Regards,

Manivannan P

gill367
Active Contributor
0 Kudos

HI

Try to pass blank string (" ")instead of NULL.

Thanks

Sarbjeet Singh