Skip to Content
author's profile photo Former Member
Former Member

code correction

hi,

What is wrong in my code ie internal table assignment, I am getting the error

DATA: IT_INBAL type STANDARD TABLE OF YMTID_C102_INVBL WITH HEADER LINE,

WA_INBAL type YMTID_C102_INVBL.

loop at i_data.

move i_data to wa_data.

select * from YMTID_C102_INVBL INTO table wa_INBAL WHERE YWRHOUSE = wa_data-whnum

AND YLOCATION = wa_data-locno.

*wa_outfile-source = 'prism'.

*wa_outfile-sscc = it_outfile-sscc.

*wa_outfile-pcmat = it_outfile-pcmat.

*wa_outfile-imtyp =

wa_outfile-whnum = wa_INBAL-s_wrhouse.

*wa_outfile-pltyp = IT_INBAL-l_pltyp.

*wa_outfile-sttyp = it_inbal-l_sttyp.

*wa_outfile-stsec = it_inbal-l_stsec.

wa_outfile-stbin = wa_data-locno.

*wa_outfile-ssino =

*wa_outfile-ssnno

wa_outfile-qunty = wa_data-qnloc.

SELECT MSEHI FROM YCAD_UOM INTO WA_outfile-unitm where LEG_MSEHI = wa_data-stdum.

ENDSELECT.

wa_outfile-unitm = wa_outfile-unitm.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = wa_data-resno

IMPORTING

OUTPUT = wa_data-resno.

.

wa_outfile-matno = wa_data-resno.

wa_outfile-batch = wa_data-lotno.

wa_outfile-plant = it_inbal-s_plant.

*wa_outfile-stats

wa_outfile-grdat = wa_data-ffdat.

wa_outfile-stloc = it_inbal-s_stor_loc.

wa_outfile-sldat = wa_data-sldat.

*wa_outfile-wmtyp = const(561)

wa_outfile-tickt = wa_data-lotno.

wa_outfile-UCOST = wa_data-UCOST.

wa_outfile-TCOST = wa_data-TCOST.

append wa_outfile to it_outfile.

endloop.

it giving me the error like wa_inbal is not an internal table occurs n is missing

If i declare it_inbal in the select statement it is not assigning the values to the fields

Can any one guide me how to solve this

plz its bit urgent

Nisha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 04:44 PM

    Well, you have to:

    select * from YMTID_C102_INVBL
      INTO table IT_INBAL 
      WHERE YWRHOUSE = wa_data-whnum
        AND YLOCATION = wa_data-locno.
    

    If you don't get values, it's because there are no values in the table that meet the selection criteria.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 07:38 PM

    Try this:

    DATA: IT_INBAL type STANDARD TABLE OF YMTID_C102_INVBL INITIAL SIZE 0,

    WA_INBAL type YMTID_C102_INVBL.

    I think this should solve it.

    Sri

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.