Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Only in debug modus field declaration is available.

Former Member
0 Likes
895

Hi All,

I've implemented a BADI which is called from the Product Structure Browser (PSB is programmed with ABAP object).

When I debug the BADI I can enter in the field box:

(SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION

The value is a date - as expected.

So far so good. But how can I implement this in my program code?

For example for this assignment:

datuv = (SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION.

i get the following error message:

'After "(SAPLCPDMOBJECTBROWSER)", there must be a space or equivalent (".",",",".")...'

Thanks for your support.

Regards Kruno

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
849

Hi,

you can use the field-symbols technique it works..

field-symbols: <fs> type any.

data : l_field type string value '(SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION'.

assign l_field to <fs>.

if sy-subrc eq 0.

<your logic>.

endif.

Hi,

you can use the field-symbols technique it works..

field-symbols: <fs> type any.

data : l_field type string value '(SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION'.

assign l_field to <fs>.

if sy-subrc eq 0.

<your logic>.

endif.

6 REPLIES 6
Read only

abdul_hakim
Active Contributor
0 Likes
849

hi below code is incorrect

datuv = (SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION.

What you are doing with the value DATE_OF_SELECTION.

you need to specify either * or any operators...

Cheers,

Abdul Hakim

Read only

Former Member
0 Likes
850

Hi,

you can use the field-symbols technique it works..

field-symbols: <fs> type any.

data : l_field type string value '(SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION'.

assign l_field to <fs>.

if sy-subrc eq 0.

<your logic>.

endif.

Read only

0 Likes
849

Hi,

thanks for your reply.

I've already tried i with the <fs> method.

But after the assignment the value of <fs> is '(SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION'.

However I need the value of the statement (SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION which is for example 20060610.

As mentioned before, in the debug modus the statement provides the needed value.

But how I can use the statement in my BADI?

Thanks & Regards!

Kruno

Read only

0 Likes
849

hi

(datuv) will give you the exact value..

Cheers,

Abdul Hakim

Read only

0 Likes
849

Hi,

what do you mean with (datuv) will give you the exact value?

Could you please post me the complete statement.

Thanks & Regards

Kruno

Read only

0 Likes
849

Hi Kruno,

I think field symbols is the only option.. try this..


field-symbols: <fs> type any.
data : l_field type string value '(SAPLCPDMOBJECTBROWSER)DATE_OF_SELECTION'.
assign (l_field)to <fs>.

Regards,

Suresh Datti