cancel
Showing results for 
Search instead for 
Did you mean: 

LSMW - Create QUOTA arrangement using IDOC method - QTAAPS_SAVEMULTIPLE2

former_member221541
Contributor
0 Kudos

Hi,

We are trying to load quota (for external procurement) in APO using LSMW - IDOC method (Message type - QTAAPS_SAVEMULTIPLE2 and Basic Type - QTAAPS_SAVEMULTIPLE202).

  1. In header data we are passing MODEL, LOCTYPE - 1007, Location_int, product_int, direction - 1, Valid from - yyyymmdd, valid to - yyyymmdd.

  1. In item data we are passing MODEL, LOCTYPE-1007, Location_int, product_int, direction - 1, Valid from - yyyymmdd, valid to - yyyymmdd, Pur_doc_no, pur_doc_item, PORG and Quota arrangement.

We are getting following errors after last step in LSMW:

Validity is not for an exact day (time 00:00:00 - 23:59:59)
Message no. /SAPAPO/OO_TR429

Internal key: IT_CIF_TRQTAH:
Message no. /SAPAPO/OO_TR414

Internal key: IT_CIF_TRQTAH: IT_CIF_TRQTAH:
Message no. /SAPAPO/OO_TR414

Quota arrangement header was not found in the database or table
Message no. /SAPAPO/OO_TR420

Please let us know if anybody has used this method before and can help us solving above issues.

Thanks,

Yogesh

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member209769
Active Contributor
0 Kudos

Hi Yogesh,

I have not worked on LSMW in this kind of scenario, but looking at your errors, I can try to propose some way ahead:

1) For your header related comment, it seems that you are not "saving" the header before you move on to create the item. If you try to create quota arrangement manually, first you need to save the quota arrangement header. This would create an entry in the table /SAPAPO/TRQTAH. Only once the header is saved (meaning there is an entry in the table /SAPAPO/TRQTAH), you should proceed further to create the quota arrangement item. This same logic needs to be there in LSMW.

2) If you go to the table /SAPAPO/TRQTAH, you would see that the time is stored as timesetamp meaning it should also include hrs, mins and secs. e.g. 20.091.214.230.000 is one value that I see in my system. You need to somehow make the system receive the timestamp value, and not only just the year, month and date.

Thanks - Pawan

former_member221541
Contributor
0 Kudos

Hi Pavan,

Thanks for your input but I had tried with "YYYYMMDDhhmmss" also and same error occurs, i am not sure what type of format it accepts and it seems issue is related to that only. when i am trying manually - entering valid from date as 01/01/2010 and valid to date as 12/31/2099 it creates quota correctly.

Thanks,

Yogesh

former_member209769
Active Contributor
0 Kudos

Hi Yogesh,

I don't have a Idoc setup in my system for this, so can't check this, but I could at least check the basic mapping needed.

You need time stamp at the header level, so hours, mins, secs are definitely needed.

In your source, how are you maintaining the dates?

If you look at "translation" in the step of 'change field mapping and conversion rules', there are options to convert the source field to teh target field.

e.g. if you are using DATUM in source, then you can specify a conversion from DATUM to TZNTSTMPS (which matches with the domain of data element of field in /SAPAPO/TRQTAH.)

You could also try out the option like convert to /SAPAPO/SCC_VALFROMTSTMP, which might be even more close as the conversion is happening to the data element of the table field.

Did you already try this out?

Thanks - Pawan

former_member221541
Contributor
0 Kudos

Hi,

UPDATES

Error related to date - "Validity is not for an exact day " has been resolved by providing input as YYYYMMDDhhmmss (here key is to give time in Valid from date as 000000 and Valid to date as 235959)

Now we are stuck with two errors:

Quota arrangement header was not found in the database or table
Message no. /SAPAPO/OO_TR420

AND

Quota arrangement items do not exist for quota arrangement header XXXXXX /YYYYYY
Message no. /SAPAPO/OO_TR213

Note: Similar error comes when we try to create Quota using BAPI - BAPI_QTASRVAPS_SAVEMULTI2 via Tcode SE37 but here though these error comes but still header data gets created. Anybody know which all fields need to be populated while using this BAPI? may be we are missing some field to populate and also it is confusing because there are many fileds with similar descritoion like PRODUCT, PRODUCT_INT etc.

If anybody has worked on this object and faced similar issue, please let me know.

Thanks,

Yogesh

Edited by: Yogesh Lohiya on Feb 19, 2012 10:00 PM

Edited by: Yogesh Lohiya on Feb 19, 2012 10:01 PM