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

query

Former Member
0 Likes
1,282

Hi,

Hi,

Please help me in this.

I have to write query as per following requirement.

To write this query i have to use '/ivl/' tables. Those tables and

fields also i am specifying here.

Query :

By passing document type, document (Bill of Entry) number and year to

table /IVL/ZMB_BEDUT, fetch the break up of custom duty from the field

ACTVALU for the respective duty code.

Here document type, document number and year are getting from

this table '/ivl/zmb_behdr'.

'ACTVALU , DUTCODE' are fields in '/IVL/ZMB_BEDUT'table.

In 'DUTCODE' these are duty codes ' BCD,CVD,ZCES,ZHCS,ZEDC,ZHDC,SAD'.

If you want to do hard coding for dutcode do it no problem.

Please give me the solution.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,241

If you want to do hard coding for dutcode do it no problem.--> <b>If u want my A/c number to tranfer money u can</b> .

Ali ,

try to put ur logic , then ask for help , dont expect us to give complete solution to u ? We dont get any thing by doing ur JOB.

We are here to help people, it doesnt mean that we will do every thing.

Regards

Prabhu

9 REPLIES 9
Read only

Former Member
0 Likes
1,242

If you want to do hard coding for dutcode do it no problem.--> <b>If u want my A/c number to tranfer money u can</b> .

Ali ,

try to put ur logic , then ask for help , dont expect us to give complete solution to u ? We dont get any thing by doing ur JOB.

We are here to help people, it doesnt mean that we will do every thing.

Regards

Prabhu

Read only

0 Likes
1,241

I wrote query like this.

select Single Actvalu Into it_itab from /ivl/zmb_bedut

where doctype EQ 'GBOE'

AND boedate IN s_boedt

AND docno = it_itab-docno.

Still that partucular duty codes i have to place.

There iam facing problem , please help me

Read only

Former Member
0 Likes
1,241

document type, document number and year are getting from

this table '/ivl/zmb_behdr'.

select doctype docno year from /ivl/zmb_behdr

into table it_zbehdr.

if not it_zbehdr[] is initial.

sort it_zbehdr by doctype docno year.

select doctype docno year actvalu dutcode from

/IVL/ZMB_BEDUT

for all entries in it_zbehdr

into table it_bedut

where doctype = it_zbehdr-doctype

and docno = it_zbehdr-docno

and year = it_zbehdr-year.

endif.

Read only

0 Likes
1,241

in addition to SS ,

if not it_zbehdr[] is initial.

sort it_zbehdr by doctype docno year.

select doctype docno year actvalu dutcode from

/IVL/ZMB_BEDUT

for all entries in it_zbehdr

into table it_bedut

where doctype = it_zbehdr-doctype

and docno = it_zbehdr-docno

and year = it_zbehdr-year

<b>and dutycodes in (' BCD,CVD,ZCES,ZHCS,ZEDC,ZHDC,SAD').</b>

endif.

check the sytax and correct the IN objects as per sytax.

Regards

Prabhu

Read only

0 Likes
1,241

This query is ok, But for particular duty codes i have to maintain them in a loop instead of writting in qurey , Can you please maintain Loop for those 7 duty codes.

In loop we maitain hardcode no problem.

Please help me to provide that duty codes in a loop.

I am confused to write this loop for those 7 duty codes .

Please give me the solution.I have no idea about this.

Thanks

Read only

0 Likes
1,241

Please help me in this query

Read only

0 Likes
1,241

Ali ,

we cannt assume what u are trying to get out of this .

u can loop like this

1.

loop at itab where dutycode ='BCD'.

do some thing.

endloop.

2.

loop at itab.

if itab-ductycode ='BCD'.

do some thing.

else.

endif.

endloop.

Regards

prabhu

Read only

0 Likes
1,241

Here i have to get that particular dutycode only. For that,

Here i can i give like this for getting particular duty code ,

LOOP AT it_bedut

CASE itab-ductycode

WHEN 'BCD'.

itab-ductycode ='BCD'.

WHEN 'CVD'.

itab-ductycode ='CVD'.

WHEN 'SAD'.

itab-ductycode ='SAD'.

WHEN 'ZCES'.

itab-ductycode ='ZCES'.

ENDCASE.

ENDLOOP.

If any mistakes in this please help me.

After this if i want to write particular duty code in Write statement for output

If i give like this is it work duty code by duty code.

Write:/ itab-ductycode .

If any changes in that please let me know.

Thanks

Read only

0 Likes
1,241

For this query the header table /ivl/zmb_behdr is declared already like the following

shown manner. For this i have to add that logic which i requested you guys before and u gave me good answers. But based up on this query i have to add that logic.

Please help me in this i already got confused about this.

**********************************************************

SELECT zztono boedate impdpsno totdtyval

zzintrst zzdtyval zzkunnr bondno docno ZZPLASLNO INTO CORRESPONDING FIELDS OF TABLE it_itab

FROM /ivl/zmb_behdr

WHERE doctype EQ 'GBOE'

AND boedate IN s_boedt

AND boestat NE 'X'.

LOOP AT it_itab.

call function 'CONVERSION_EXIT_ALPHA_OUTPUT'

exporting

input = it_itab-ZZPLASLNO

IMPORTING

OUTPUT = it_itab-ZZPLASLNO.

.

w_dtyval = it_itab-zzdtyval.

CALL FUNCTION 'FI_ROUND_AMOUNT'

EXPORTING

amount_in = w_dtyval

company = '1970'

currency = 'INR'

IMPORTING

amount_out = w_dtyval

  • DIFFERENCE =

  • ROUNDING_UNIT =

.

it_itab-zzdtyval = w_dtyval.

MODIFY it_itab.

SELECT SINGLE bondregnno

INTO it_itab-bondregnno

FROM /ivl/zmb_bndmas

WHERE bondno = it_itab-bondno.

SELECT SINGLE kvgr3 INTO it_itab-kvgr3

FROM knvv

WHERE kunnr = it_itab-zzkunnr

AND kvgr3 IN s_kvgr3.

IF sy-subrc = 0 .

MODIFY it_itab TRANSPORTING bondregnno kvgr3.

w_duty = w_duty + it_itab-zzdtyval.

w_int = w_int + it_itab-zzintrst.

w_tot = w_tot + it_itab-totdtyval.

ELSE.

DELETE it_itab.

CONTINUE.

ENDIF.

ENDLOOP.

DESCRIBE TABLE it_itab LINES w_hdline.

*********************************************************************

This is already existing logic which i have to add that query.

Thanks