cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a customer table (e.g zcust) to a transaction

Former Member
0 Kudos

Hi,

A limitation i EEW is that you can not add a customer tables to a transaction (maintainable in transaction CRMD_ORDER) as one can do to a business partner (maintainable in transaction BP). Does any one know how to accomplish that with out EEW.

KR

Jan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

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.

Regards

Kaushal

Former Member
0 Kudos

HI Kaushal,

Thanks for your clarifying reply.

Just one thing what do you mean with nbr 7. How do I link to ‘SAVE’ event? Or do you mean that I should implement the function module call in the BADI for ORDER_SAVE?

Kind regards

Jan

P000636
Active Contributor
0 Kudos

Hi Jan

I think KT talk about create your function module to save the data and assing in the event save. Transaction: CRMV_EVENT.

BADI ORDER_SAVE is other possible solution.

Regards.

Manuel

Former Member
0 Kudos

I recommend to use event FM using transaction CRMV_EVENT.

ORDER_SAVE badi is generally used to perform checks before save.

Regards

Kaushal

Answers (3)

Answers (3)

Former Member
0 Kudos

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 ?

former_member927251
Active Contributor
0 Kudos

Hi Jan,

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.

Regards,

Amit Mishra

Former Member
0 Kudos

Hi

As I understand it is a one to one relation between CRMD_ORDERADM_H and CRMD_CUSTOMER_H. In my case I would need a one to many relations between CRMD_ORDERADM_H and CRMD_CUSTOMER_H (or a similar table).

KR

Jan

former_member927251
Active Contributor
0 Kudos

Hi Jan,

I am sorry. It's not possible through EEWB.

You will have to look for some other alternative.

Let me also know the same. All the best.

Regards,

Amit Mishra

Former Member
0 Kudos

Hi jan,

it is possible, but it means that you will have to enhance the complete flow yourself (what the EEWB normally does for you).

Michael.

Former Member
0 Kudos

I guessed that, do you know what steps to conduct to be able to achieve that?

Or do you know of any cookbook handling this kind of enhancement in CRM

KR

Jan

Former Member
0 Kudos

do you have mobile sales on the system?

Former Member
0 Kudos

We are not using mobile sales

KR

Jane

Former Member
0 Kudos

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?

Michael.

Former Member
0 Kudos

Hi,

Yes, you can assume that we are going using SAP GUI

We have some additional fields in the order transaction created using EEWB.

KR

Jan

former_member927251
Active Contributor
0 Kudos

Hi Jan,

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>

Regards,

Amit Mishra

Former Member
0 Kudos

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

KR

Jan