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

logic required

Former Member
0 Likes
629

hi frnds,

My report shows only last 2 billing schedule of line item of contract no. 10117418,

BillSt (Billing status) of which is u201CA- Not yet processedu201D.

but it should include all billing schedules which has BillSt= A,B & C (u201CFPLT- FKSAF = A,B&Cu201D)

In the existing report the code is something like

DATA: BEGIN OF I_BILLING OCCURS 0.

INCLUDE STRUCTURE FPLTVB.

DATA: END OF I_BILLING.

where they have used structure and code as

IF I_BILLING-FKSAF EQ 'A'----


>> status only for A.

AND I_BILLING-FKDAT EQ T_BILL_DATE.

V_WAERK = I_BILLING-WAERS.

SELECT SINGLE * FROM TCURX

WHERE CURRKEY = V_WAERK .

IF SY-SUBRC = 0.

I_BILLING-FAKWR = I_BILLING-FAKWR * 100.

ENDIF.

-


>> my requirement is to get all the contract no for which bill status is A B and c.

HOW TO code this.

4 REPLIES 4
Read only

Former Member
0 Likes
603

hi,

IF I_BILLING-FKSAF EQ 'A' AND I_BILLING-FKSAF EQ 'B' AND I_BILLING-FKSAF EQ 'C' -


>> status only for A,B,C.

AND I_BILLING-FKDAT EQ T_BILL_DATE.

RGDS.,

SUBASH

Read only

former_member787646
Contributor
0 Likes
603

Hi

Try the following and check.

IF I_BILLING-FKSAF CO 'ABC' .

.....You code goes here.....

ENDIF.

Hope this would help you.

Murthy

Read only

Former Member
0 Likes
603

Hi Daniel,

Your logic shud be:

IF ( I_BILLING-FKSAF EQ 'A' OR

I_BILLING-FKSAF EQ 'B' OR

I_BILLING-FKSAF EQ 'C' )

AND I_BILLING-FKDAT EQ T_BILL_DATE.

      • Your code

ENDIF.

Regards,

Nadim

Read only

former_member217544
Active Contributor
0 Likes
603

Hi,

If A,B and C are the only possible values for FPLT- FKSAF then you can remove the condition for FKSAF field and write the select query as follows:

I_BILLING-FKDAT EQ T_BILL_DATE.

V_WAERK = I_BILLING-WAERS.

SELECT SINGLE * FROM TCURX

WHERE CURRKEY = V_WAERK .

IF SY-SUBRC = 0.

I_BILLING-FAKWR = I_BILLING-FAKWR * 100.

ENDIF.

If it contains values other than these three then write teh select query as follows:

IF I_BILLING-FKSAF EQ 'A' or

I_BILLING-FKSAF EQ 'B' or

I_BILLING-FKSAF EQ 'C' -


>> status only for A,B & C.

AND I_BILLING-FKDAT EQ T_BILL_DATE.

V_WAERK = I_BILLING-WAERS.

SELECT SINGLE * FROM TCURX

WHERE CURRKEY = V_WAERK .

IF SY-SUBRC = 0.

I_BILLING-FAKWR = I_BILLING-FAKWR * 100.

ENDIF.

Hope this will help.

Regards,

Swarna Munukoti.