cancel
Showing results for 
Search instead for 
Did you mean: 

How to set standart fields in SHIPPING and SALES tables in items?

former_member186148
Active Participant
0 Kudos

Hello SDN!

I need to fill some standart fields in CT_SHIPPING and CT_SALES tables (sorry, I don't know their real names, written names used commonly in BADI) for items. I've got a BADI for header (extends IF_EX_CRM_ISA_BASKET_HEAD) and item (extends IF_EX_CRM_ISA_BASKET_ITEM) with methods CHANGEHEAD_BEFORE_ORDER and CHANGEITEMS_BEFORE_ORDER correspondenly. In these methods I try to fill required fields. These fields filled OK for header, but when I tried to fill fields for item it still saved to header. In these tables REF_KIND sets 'B' for item, REF_GUID also sets properly... Can anybody give rules for filling these fields? What main fields (such as REF_KIND) must be set and which values must they have?

version of subject is CRM 5.0 SP 11

Help will be appreciated.

Regards, Lev

Edited by: Lev Kulaev on Sep 8, 2008 9:24 AM

give a version of CRM and give more detailed description of problem

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Lev,

There is a report program in CRM that might give you more insight into how or which columns you should fill in those complex structures. The program name is CRM_ORDER_MAINTAIN. The idea is to use this program with real data (existing orders) and see how these structures are filled in. The program lets you do that without any debug.

Once you understand the structures and the data that goes in their, you can use that knowledge to code your maintain programs.

Easwar ram

http://www.parxlns.com

former_member186148
Active Participant
0 Kudos

Hello Easwar!

Thank you for reply! But I have some questions about using it...

1) About your idea. Does it mean that I should create an order via backend and after that see this order with this program?

2) general question - has this program another ways of using and if yes for what and how program may used be? I saw checkboxes and buttons opening additional setup screens but for what...

Anyway thank you for help

Regards, Lev

Former Member
0 Kudos

Hello Lev,

Yes, if you have a "fully loaded" order - I mean some good order that has all the business data (such as shipping, sales ord, schedline etc. available. Usually an order that has been created in CRM or downloaded from R/3 should do to understand the data structures.

To start with, just give the Transaction Number as the onl;y input and execute. And read through the output - each set (ET_SHIPPING) etc you are interested in. The several GUID and REF_GUID and REF_KINDs can be better understood with an example than me providing the explanation and code.

An equivalent counterpart to this report program is the CRM_ORDER_READ, which does the same thing but does not let you play with the maintain part. CRM_ORDER_MAINTAIN program allows you to try the ipdate / change / maintain.

Well here is the help text for CRM_ORDER_MAINTAIN

<h5>Short text</h5>

Test program for function module CRM_ORDER_MAINTAIN

<h5>Purpose</h5>

This program replaces the missing option to execute a single test for the function module CRM_ORDER_MAINTAIN.

The usual single test function in transaction SE37 is not possible as sorted tables are used as import parameters. The module RS_COMPLEX_OBJECT_EDIT used from Basis for maintaining import parameters is only able to process standard tables.

<h5>Features</h5>

The report executes a test call of the function module CRM_ORDER_MAINTAIN and displays the result (the export parameters).

In addition, it is possible to

<li>Save the changed data on the database,

<li>Delete the buffer afterwards,

<li>And, by calling CRM_ORDER_READ, to read it again.

<h5>Selection</h5>

<li>Specify the transaction number, the transaction GUID or the item GUID for changing an existing transaction.

<li>Specify how many headers or items are to be created for creating new transactions or items.

<li>Select "Subobject to be maintained" for the subobjects that you wish to change or enter.

<li>After, enter "Maintain input values", and maintain the interface for CRM_ORDER_MAINTAIN. This means you make an entery for the IT_X_COM parameter for subobject X, and make the required entries in the CT_INPUT_FIELDS table.

<li>If you wish to save and initialize after the change, specify this.

<li>If the transaction should be re-read in the buffer afterwards, specify this.

<h5>Standard Variants</h5>

You can save your entries as a variant. All entered data is then stored under a GUID in the INDX table, and can be recovered again by calling this variant.

<h5>Output</h5>

The output parameter for CRM_ORDER_MAINTAIN and, if necessary, for CRM_ORDER_SAVE, CRM_ORDER_INITIALIZE and CRM_ORDER_READ are issued.

Easwar Ram

http://www.parxlns.com