cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory Sales Organization in CS

Former Member
0 Kudos

Hi all,

I have a question:

How I can put data required sales organization in an order of CS? I have tried through the TX OIAY add those fields as mandatory, but here are just some PSMDO table fields, not the sales area (VKORG, VTWEG, SPART...).

From modulpool SAPLCOI3 select the group screen "SERV" and I do not know if it's possible to add other group screen, since the sales organization dynpro is a different one.

I have also tried to use the user-exit IWO10009, but by creating an order when this exit access in the internal table based on the type CAUFVD, not store these fields (strange that the standard does not do this, but for other fields of PSMDO as MATNR or MENGE, does). See below standart Module.

With WORKORDER_UPDATE badi I fought too but I have not gotten anything in the method validation AT_SAVE because the parameter type IS_HEADER_DIALOG also used as the CAUFVD, and sales organization data are not included.

Is there a customizing option for this? Is there another exit or badi to let me validate that this fields of sales organization are filled?

Thanks in advance

Standart Module:

*&---------------------------------------------------------------------*
*&      Module  UPDATE_PMSDO_CAUFVD  INPUT
*&---------------------------------------------------------------------*
*       update pmsdo data and set change flag for the service order
*----------------------------------------------------------------------*
MODULE update_pmsdo_caufvd INPUT.

*        Daten für Bezugsobjekt
  PERFORM pmsdo_get_data CHANGING pmsdo.

  CALL FUNCTION 'PMSDO_SET'
    EXPORTING
      i_pmsdo        = pmsdo
      i_force_update = g_configuration_was_changed.

  PERFORM update_caufvd.

ENDMODULE.                 " UPDATE_PMSDO_CAUFVD  INPUT

***

FORM UPDATE_CAUFVD.

* local data -----------------------------------------------------------

* constants

* data declaration

  DATA: L_CAUFVD LIKE CAUFVD.
  DATA: L_INFO   LIKE PMSDO_INFO.

* main part ------------------------------------------------------------

  READ TABLE GT_INFO INTO L_INFO WITH TABLE KEY
       OBJNR = CAUFVD-OBJNR.

  PERFORM READ_CAUFV_AUF(SAPLCOBH)
    USING
      CAUFVD-AUFNR
      L_CAUFVD
      SY-SUBRC.

  L_CAUFVD-MATSV = PMSDO-MATNR.
  L_CAUFVD-MEHSP = PMSDO-MEINS.
  L_CAUFVD-MNGSP = PMSDO-MENGE.
  IF ( ( L_INFO-FLG_UPD      EQ 'I'               ) OR
       ( L_INFO-FLG_UPD      EQ 'U'               ) OR
       ( L_CAUFVD-KDAUF_AUFK NE CAUFVD-KDAUF_AUFK ) OR
       ( L_CAUFVD-KDPOS_AUFK NE CAUFVD-KDPOS_AUFK ) OR
       ( L_CAUFVD-BEMOT      NE CAUFVD-BEMOT      ) ).
    L_CAUFVD-FLG_PMSD   = 'X'.
  L_CAUFVD-KDAUF_AUFK = CAUFVD-KDAUF_AUFK.
  L_CAUFVD-KDPOS_AUFK = CAUFVD-KDPOS_AUFK.
  L_CAUFVD-BEMOT = CAUFVD-BEMOT.
  ENDIF.

  CALL FUNCTION 'CO_IH_SET_HEADER'
       EXPORTING
            caufvd_imp = l_caufvd
       IMPORTING                                      "n699278
            caufvd_exp = l_caufvd.                    "n699278
  PERFORM caufv_upd(saplcobh) USING l_caufvd.         "n699278
ENDFORM.                    " UPDATE_CAUFVD

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
burag_kalayciyan
Explorer
0 Kudos

Hi Dani,

I must do the same. I need default sales organization data in CS order. We controlling data "2- when order is releasing" and we want it, stay same. Do u have a option ?

Answers (1)

Answers (1)

former_member186385
Active Contributor
0 Kudos

Hi,

Could you please try in OIAZ transaction where you can find sales organization

you can set it as required field

regards,

santosh

Former Member
0 Kudos

Hi santosh,

Thanks for your help,

I had already tried this transaction and in my case does not apply. Fields I want to make mandatory, not from commercial location tab, which keeps in Table ILOA, but of the subscreen "Sales Data" in the menu "Extras" and stored in the PMSDO. The required field in particular, is the distribution channel, PMSDO-VTWEG for subsequent derivations CO-PA, but we want to make it obligatory full sales area.

Thanks again,

A greeting