‎2009 Feb 12 6:01 AM
Hi All.
I need to insert some records from report program to database table. before that Am Sending set of records to customized function module for some validation. IT_PO is a table parameter in the function module. its using to pass records from report to FM. I have to insert record from table parameter IT_PO to my ZTABLE in the FM itself. Here is getting error like The Work area IT_PO is not long enough
Please guide me.
Thanks in Advance.
‎2009 Feb 12 6:05 AM
chk if the structure of both the itab and the data base table are the same.
‎2009 Feb 12 6:05 AM
Hi Raj
Did you declare it_po as of the same TYPE as the FM parameter table?
Pushpraj
‎2009 Feb 12 6:09 AM
Hi Raj,
Only in one case you will got that error. That is Internal table Or Work area Structure is not Equal to Database table. So you can declare the Corresponding ITab or Work area Equal to Database table Fields list.
‎2009 Feb 12 6:22 AM
Hi,
The error may occur due to Internal table may not match with the database,
if not then the functional module used for validation might raise error.
It is better not use FM for inserting data into the database...
can u able tell the functional module used for validation...
‎2009 Feb 12 7:08 AM
Hi guys,
IT_PO like ZPO as table parameter in FM using this syntax to insert records.
INSERT ZTAB FROM IT_PO .
COMMIT WORK.
ZPO and ZTAB both are same structre.
Please guide me.
Thanks.
‎2009 Feb 12 11:48 AM
Hi Rajkumar,
What problem are you facing to declare , IT_PO like ZTAB.
Do this change , it'll work.
and Press F1 on INSERT, MODIFY and UPDATE statement, U'll get lot of inputs.
‎2009 Feb 12 7:33 AM
Hi,
Check in the Debug mode, whether values are getting into IT_PO.
‎2009 Feb 12 11:24 AM
Hi Mahesh,
i am getting the values in itab while debugging it..
‎2009 Feb 12 12:24 PM
Hi,
Declare your IT_PO like ZTAB
and the stmt. as
INSERT ZTAB FROM TABLE IT_PO.
Pl. check .
thanks
‎2009 Feb 12 11:27 AM
after getting the entries to ur itab. jus modify ur database table from this itab transporting the fields.
any error u r gettin here?
‎2009 Feb 12 11:31 AM
Hi,
Yes getting error like The Work area IT_PO is not long enough.
‎2009 Feb 12 11:34 AM
i mean r u getting this at modify statement? chk sy-subrc after the fm and also at modify.
else try: u jus loop at itab.
fetch value to a wa.
modify the database table from wa.
endloop.
‎2009 Feb 12 11:39 AM
Hi,
You import parameter IT_ PO in the FM, instead of that
create table type for the ZTABLE (ztable-table_type),
change it_po type ztable to
-
IT_PO TYPE ZTABLE-TABLE_TYPE.
Hope it helps u...
‎2015 Oct 16 1:12 PM
hi,
dear experts, i have an typical issue. plz get me out this.
details are below,
we all are familiar with ME9K , this is used to print the purchase documents which is released,
customer wants to see the po docs which is not released, i tried to create a z## prog but enhancements is not going to copy as per sap standards, no enhancements were found in my side..
plz help me this,,,