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

sumbb field

Former Member
0 Likes
800

I have one field SUMBB, which belongs to Q0008 structure. Now I have to display this SUMBB field in report. How I will write the code for that.

Plz help me.

Thanks & Regards.......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
730

Hi,

Can you explain your question little more, becoz i am not understanding your requirement.

Regards,

Naveen

I have one field SUMBB, which belongs to Q0008 structure. Now I have to display this SUMBB field in report. How I will write the code for that.

Plz help me.

Thanks & Regards.......

4 REPLIES 4
Read only

Former Member
0 Likes
731

Hi,

Can you explain your question little more, becoz i am not understanding your requirement.

Regards,

Naveen

Read only

Former Member
0 Likes
730

Hi

This is the field to show SUM of all the Amounts of all Wage types.

So in your report you will be using/fetching the individual wage types amount

declare a variable and do the SUMs into this field in the loop of wage type amounts in the internal table.

Reward points if useful

Regards

Anji

Read only

0 Likes
730

Can you write statement for me.

Thanks & regards.....

Read only

0 Likes
730

Abhay,

This field is lcally defined in the Module Pool MP000800.

They are using it to store total value from a calculation of all the wage type amounts.

This field doesnt storing value any where.

Check this code from the Module Pool -

LOOP AT tblgart.

IF tblgart-lgart NE ' ' AND tblgart-lgart NE '0000'. "YWWK066217

tblgart-count = tblgart-count + 1. "YWWK066217

ENDIF. "YWWK066217

CHECK tblgart-betrg NE 0.

CHECK tblgart-adsum NE space.

*>>>begin of insertion >>>----


>>>"HCMOPS2737

  • convert to local currency

IF pspar-infty EQ '0008' AND

tblgart-waers NE p0008-waers.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

date = q0008-ibbeg

foreign_amount = tblgart-betrg

foreign_currency = tblgart-waers

local_currency = p0008-waers

IMPORTING

local_amount = local_betrg

EXCEPTIONS

no_rate_found = 1

overflow = 2

no_factors_found = 3

no_spread_found = 4

derived_2_times = 5

OTHERS = 6.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE 'W' NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ELSE.

local_betrg = tblgart-betrg.

ENDIF.

*<<<end of insertion <<<----


<<<"HCMOPS2737

IF tblgart-opken EQ space.

  • ADD tblgart-betrg TO cal_sum. "HCMOPS2737

ADD local_betrg TO cal_sum. "HCMOPS2737

ELSE.

  • SUBTRACT tblgart-betrg FROM cal_sum. "HCMOPS2737

SUBTRACT local_betrg FROM cal_sum. "HCMOPS2737

ENDIF.

ENDLOOP.

here cal_sum field is of type Q0008-Sumbb and its of no use after the loop.

So might be this logic will help you in extracting your value.

Regards,

Amit

Reward all helpful replies.