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

text description

Former Member
0 Likes
1,335

hi ,

FORM GET_DATA .

   select vbeln kunnr audat waerk bstnk bstdk from vbak into TABLE it_vbak where vbeln in P_sale.

   select * from vbap into table it_vbap for all ENTRIES IN it_vbak where vbeln = it_vbak-vbeln.

  select vbeln inco1 zterm from vbkd into TABLE it_vbkd for ALL ENTRIES IN it_vbak where vbeln = it_vbak-vbeln.

   select kunnr name1 ort01 from kna1 into TABLE IT_KNA1 for ALL ENTRIES IN it_vbak where kunnr = it_vbak-kunnr.

   loop at it_vbap into wa_vbap.

  

      read table it_vbak into wa_vbak with key vbeln = wa_vbap-vbeln.

      if sy-subrc = 0.

        wa_final-vbeln = wa_vbak-vbeln.

        wa_final-audat = wa_vbak-audat.

        wa_final-waerk = wa_vbak-waerk.

        wa_final-bstnk = wa_vbak-bstnk.

        wa_final-bstdk = wa_vbak-bstdk.

       select single edatu into wa_final-edatu from vbep where vbeln = wa_vbap-vbeln."delivery date

      read table it_vbkd into wa_vbkd with key vbeln = wa_vbap-vbeln.

       if sy-subrc = 0.

       select single bezei into wa_final-bezei from tinct where inco1 = wa_vbkd-inco1 and spras = 'EN'."terms of delivery

       select single vtext into wa_final-vtext from tvzbt where zterm = wa_vbkd-zterm and spras = 'EN'."terms of payment

       endif.

      read table it_kna1 into wa_kna1 with key kunnr = wa_vbak-kunnr.

      if sy-subrc = 0.

       wa_final-kunnr = wa_vbak-kunnr.

       wa_final-name1 = wa_kna1-name1.

       wa_final-ort01 = wa_kna1-ort01.

      endif.

      endif.

    wa_final-posnr = wa_vbap-posnr.

    wa_final-matnr = wa_vbap-matnr.

    wa_final-arktx = wa_vbap-arktx.

    wa_final-netpr = wa_vbap-netpr.

    wa_final-netwr = wa_vbap-netwr.

    wa_final-kpein = wa_vbap-kpein.

    wa_final-kmein = wa_vbap-kmein.

    wa_final-ZMENG = wa_vbap-zmeng.

    APPEND wa_final to it_final.

    endloop.

ENDFORM.                    " GET_DATA




am getting all the values except that terms of payment and terms  of delivery am not getting i dont know what mistake i did (bezei fld and vtext fld )


please help me


with thanks,

Maha.



4 REPLIES 4
Read only

SimoneMilesi
Active Contributor
0 Likes
1,056

You are using

and spras = 'EN'.

but abap recognize the internal format SPRAS = 'E'.


You can also use FM CONVERSION_EXIT_ISOLA_INPUT to get the internal 1 digit value for language




Read only

former_member188724
Contributor
0 Likes
1,056

Hi,

First check whether you have Terms of payment & delivery entry maintained for langauge EN for your specific inco1 & zterm.You may not have data.

Instead of using select single, get values in to internal table like what you do for others

in that case you can also know whether entry is there as sy-subrc will fail.

Regards,

K.S

Read only

0 Likes
1,056

in tinct and tvzbt having the table contents even for that terms of delivery it has to get the the text CIF  -COst insure freight like that it has to show

Read only

0 Likes
1,056

Hi,

Please try to hard code any one value for wa_vbkd-inco1 & wa_vbkd-zterm in the select stmnts and check whether you get the output.

As i said try to get all values of tinct & tvzbt into itabs for all entries in it_vbkd.

then chk whether tinct & tvzbt tables have entries.then you can know whether vbkd has entries for inco1 & zterm.

Regards,

K.S