Why you don't want to use EEWB.
It would be very easy through EEWB. You can add a custom tab containing all the field both at Header and Item Level and it will modify the structures CRMT_CUSTOMER_H_WRK(Header Level) and CRMT_CUSTOMER_I_WRK(Item Level) which are used in CRMD_CUSTOMER_H and CRMD_CUSTOMER_I respectively.
These are meant for easy enhancement only. Why do you want to add a costom table to the transaction if the standard table itself gets modified through EEWB.
<b>Please reward points if it helps and makes any sense.</b>
I would like to use the EEW if it supplied the desired functionality but in this case I would like to create a one too many relations between a transaction item and or the head.
And be able to maintain it via transaction CRMD_ORDER. As fare as I understand this can not be accomplished using the EEW. Please correct me if I am wrong
You can do that. Actually, it is by default one to many.
For one header you have multiple line items. Even if you enhance it using EEWB it will maintain the same.
Refer the tables CRMD_ORDERADM_H and CRMD_ORDERADM_I.
Same applies to CRMD_CUSTOMER_H and CRMD_CUSTOMER_I.
The relationship is by default one to many.
Just execute the report CRM_ORDER_READ for a transaction that has multiple line items. It will show you the same as mentioned above.
Please reward points if it helps.
Ok, that makes it a lot easier. You'll only have to enhance the transaction to include the maintenance of the Z*table.
If you don't need to distribute the data, there's no need to enhance the middleware.
All you have todo is the modification of the customer screen and the mapping/reading of the DB within the transaction.
Do you already have an enhancement available on the order transaction?
Will you use SAP GUI?
I have worked on a similar scenario where I added a table conttrol on the custom tab at contract line item.
As you already have a custom screen, please follow the following steps;
1. Create a new global internal table (git_cust) that corresponds to the your custom table.
2. Create a table control on the custom screen and link that with the global internal table (git_cust).
3: populate git_cust in the PBO of the custom screen with data of current transaction.
4. Use statement
LOOP at git_cust INTO wa_cust WITH CONTROL contrl.
to fill table control with data from the internal table.
5. In PAI, use
LOOP AT git_cust. chain endchain ENDLOOP.
to update the internal table with the modified data.
6. Create a subroutine (subX) that should be called on commit. In this subroutine, update the custom table with data in the internal table.
7. Create a function module and link it to 'SAVE' event for object ORDERADM_H. In the function module, call the subroutine (subX) on commit.
These are the basic steps required. Please letme know the specific requirements so thatI can help you point by point.
Guys, I have to create a new tab and then new field in that tab. These fields have to be taken to R/3. I'm kind of blank how to start it. I understand that I have to use EEWB to create the Tab and the fields. EEWB will do it's own part of extending the tables. And I'm assuming the Values of the fields will be saved in the tabled without doing any programing. Now how do I approach the middleware and R/3 ? Or I am wron and I will have to do programming for the values to be saved in the CRM ?