cancel
Showing results for 
Search instead for 
Did you mean: 

Create Mode variable in CRM

Former Member
0 Kudos

How can i bypass a piece of code which checks if its a creation mode of sales order ? Is there a sytem variable using which i can do that ?? Like the way we have in ECC SY-TCODE or T180-TRTYP ???

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

In crm system you have syst table in which you have field like tcode. you can use that like this.

in declaration statement

tcode type sytcode,

using it into program,

if sy-tcode = 'Z_PCP_BACKORDERS'.

hope it will useful.

thanks

Former Member
0 Kudos

Thanks for the replies...But if i use Sy-tcode = 'CRMD_ORDER', the same transaction is used for create & change. Also the same transaction is used for all of the documents like quotes, orders, inquiries, contracts etc.... but i want to restrict only for sales order creation action.

Former Member
0 Kudos

I don't know where you do your coding but if you at that time have the GUID of the sales order your should be okay. You can the read data from the buffer via FM CRM_ORDER_READ_OW and thereby find out if it is a sales order. Secondly, you can check - as mentioned earlier - if the GUID is already saved in the database.

/Anders

Former Member
0 Kudos

You can always check this by looking in table CRMD_ORDERADM_H to see if the sales order is saved or not. If no entry exists in CRMD_ORDERADM_H it is create mode.