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

need some help

Former Member
0 Likes
1,103

Please use a meaningful subject in future

Hi Experts,

I am doing coding in BI7 update rule:

Where I am checking if object type is 0NWA,then derive profit center from network master data where the field network should be equal to the first 7 digits of variable PIOVALUE so I am directly assigning it there...is this correct(the code is marked in ** - **)?

IF COMM_STRUCTURE-piobjsv = '0NWA'.
      READ TABLE i_NW WITH TABLE KEY
      co_area = COMM_STRUCTURE-co_area
      **Network = COMM_STRUCTURE-PIOVALUE+0(7).**
      IF sy-subrc = 0.
        RESULT = i_NW-profit_ctr.
        v_part_prctr = i_NW-profit_ctr.
      ENDIF.
    ENDIF.

Edited by: Matt on May 14, 2009 8:54 AM - added tags

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,015

Hi,

your code is correct

and you can also use in this way

Network = COMM_STRUCTURE-PIOVALUE(7).

Please use a meaningful subject in future

Hi Experts,

I am doing coding in BI7 update rule:

Where I am checking if object type is 0NWA,then derive profit center from network master data where the field network should be equal to the first 7 digits of variable PIOVALUE so I am directly assigning it there...is this correct(the code is marked in ** - **)?

IF COMM_STRUCTURE-piobjsv = '0NWA'.
      READ TABLE i_NW WITH TABLE KEY
      co_area = COMM_STRUCTURE-co_area
      **Network = COMM_STRUCTURE-PIOVALUE+0(7).**
      IF sy-subrc = 0.
        RESULT = i_NW-profit_ctr.
        v_part_prctr = i_NW-profit_ctr.
      ENDIF.
    ENDIF.

Edited by: Matt on May 14, 2009 8:54 AM - added tags

7 REPLIES 7
Read only

Former Member
0 Likes
1,016

Hi,

your code is correct

and you can also use in this way

Network = COMM_STRUCTURE-PIOVALUE(7).

Read only

0 Likes
1,015

Hi,

One question length of PIOVALUE is 20 and only first 7 digits are of netwok rest are for other so thats y reading 0(7) ...then what you sugggesting will work in the same way i mean does it read first 7 digits only?

Read only

0 Likes
1,015

Yes, it will read the first Seven digit only in case of +0(7).

Read only

0 Likes
1,015

Its all same.

P0(6), P(6), P(6)

Read only

0 Likes
1,015

Thanks Anup and Shital...i have rewarded your ans

Read only

Former Member
0 Likes
1,015

Pia - please use a more informative subject line in the future.

Rob

Read only

matt
Active Contributor
0 Likes
1,015

Please use a meaningful subject in future