PP - User-exit for planned order

SAP 2010. 7. 21. 17:08 Posted by KindKay

User-exit for planned order  
Posted: Sep 24, 2008 4:48 AM
     
Hi,

Is there any user-exit or BADI for planned order to check the components used in planned order. In our system, user can create the planned order manually through MD11 and change the components, we need to verify the components meet certain conditions/criteria.

I did some research but could not find any user-exit for planned order. According to me, as planned order is only for planning purpose, SAP has not given any provisions for user-exits. Hence posting the query to the group.

Regards,


Hi,

As per my knowledge there is no user exit for planned order.

However you can try with following user exit :

Enhancement : PPCO0023

Function Module : EXIT_SAPLCOMK_014 which checks changes for components in order

INCLUDE ZXCO1U23

Hope it may work for you.

Regards,
Tejas



Hi,

You can try the following BAdIs:

You can use the Business Add-In (BAdI) MD_PLDORD_CHANGE to change, before posting, data from planned orders, which have been created, changed, or deleted as a result of planning a material or manual processing.

The Business Add-In allows you to fill and change fields from planned orders in the PLAF table. It also supports filling of customer-specific fields in the customer include CI_PLAFDB.

You can execute the Business Add-In in the planning run in the following areas:

Material requirements planning
Master production planning
Long-term planning
You can also carry out the Business Add-In in all applications, which execute manual planned order changes. Examples of this kind of application are:

The dialog transactions for creating and changing planned orders (MD11, MD12, MS11, MS12)
The Business Application Programming Interfaces (BAPI) for creating and changing planned orders

Regards,
R.Brahmankar


Thanks Brahmankar.

This BADI should help me in ECC 6.0. Our current version is 4.6c and we will have to wait until we upgrade to be able to use this BADI. But thanks for providing the solution.


출처: http://forums.sdn.sap.com/thread.jspa?threadID=1059414

'SAP' 카테고리의 다른 글

Frequently Used Tables  (1) 2010.09.20
MM - PR User-exit  (3) 2010.09.13
MKAL - Production Versions of Material  (1) 2010.07.15
PP - SR_PP.pdf  (1) 2010.07.15
MTO (Make To Order)  (0) 2010.07.07

cx_root - Division by zero

SAP/ABAP 개발 2010. 7. 21. 14:07 Posted by KindKay

  *&-----------------------------------------------------------*
*& Report  YRTEST0037
*&
*&----------------------------------------------------------*
*&
*&
*&-----------------------------------------------------------*

report  yrtest0037.

  data: lv_msg  type bapi_msg,
        lr_root type ref to cx_root,
        l       type i.


*------------------------------------------------------------*
end-of-selection.
*--------------------------------------------------------------*
   l = 10.

  try.
    l = l / 0.
  catch cx_root into lr_root.
    lv_msg = lr_root->get_text( ) .
    write: lv_msg.
  endtry.

Message Class 조회

SAP/ABAP 개발 2010. 7. 21. 10:30 Posted by KindKay


report yrtest0035.

  include yrtest0035top.
  include yrtest0035f01.



*-----------------------------------------------------------------*
initialization.
*-----------------------------------------------------------------*
  if s_arbgb[] is initial.
    mac_add_range s_arbgb 'I' 'CP' 'Z*' ''.
  endif.


*-----------------------------------------------------------------*
start-of-selection.
*-----------------------------------------------------------------*
  perform select_data.


*-----------------------------------------------------------------*
end-of-selection.
*-----------------------------------------------------------------*
  call method zcl_ppz_msg_util=>msg_data_found( it_table = gt_itab[] ).
  check gt_itab[] is not initial.

  perform get_event_list using gt_events 0.
  perform set_event.
  perform set_layout.
  perform set_fieldcat.
  perform display_alv.
 



*&-----------------------------------------------------------------
*& Include YRTEST0035TOP
*& User    A539
*& Date    2010.07.21
*&-----------------------------------------------------------------


*-----------------------------------------------------------------*
* type
*-----------------------------------------------------------------*
  type-pools: slis.


*----------------------------------------------------------------*
* table
*----------------------------------------------------------------*
  tables: t100a,    "T100에 대한 메세지 ID
          rsdag.

*--------------------------------------------------------------*
* internal table
*--------------------------------------------------------------*
  data: begin of gt_itab occurs 0.
          include structure t100a.
  data: end of gt_itab.

  data: itab like table of bdcmsgcoll with header line.


*--------------------------------------------------------------*
* BDC
*------------------------------------------------------------*
  data: gt_bdcdata like bdcdata    occurs with header line,
        gt_messtab like bdcmsgcoll occurs with header line,
        gs_options like ctu_params.


*----------------------------------------------------------*
* data
*--------------------------------------------------------------*
  data: gt_lvc_fcat type lvc_t_fcat,
        gs_lvc_layo type lvc_s_layo,
        gs_layout   type slis_layout_alv.

  data: gt_events type slis_t_event.

  data: gt_slis_t_fieldcat_alv type slis_t_fieldcat_alv,
        gs_slis_fieldcat_alv   type slis_fieldcat_alv.


*-------------------------------------------------------------*
* macro
*-------------------------------------------------------------*
* macro for filling select-option
  define mac_add_range.
    clear: &1.
    &1-sign    = &2.
    &1-option  = &3.
    &1-low     = &4.
    &1-high    = &5.
    append &1.
  end-of-definition.



*&-------------------------------------------------------------*
*&  Include           YRTEST00001_SEL
*&-------------------------------------------------------------*

  selection-screen begin of block b1 with frame title text-001.

    select-options: s_arbgb for t100a-arbgb.

  selection-screen end of block b1.
 



*&----------------------------------------------------------
*& Include YRTEST0035F01
*& User    A539
*& Date    2010.07.21
*&-------------------------------------------------------------

*&-------------------------------------------------------------*
*&      Form  DISPLAY_ALV
*&--------------------------------------------------------------*
*       text
*---------------------------------------------------------------*
form display_alv .

  call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      i_callback_program       = sy-cprog
      it_fieldcat              = gt_slis_t_fieldcat_alv
      is_layout                = gs_layout
      i_default                = 'X'
      i_save                   = 'A'
      it_events                = gt_events
    tables
      t_outtab                 = gt_itab.

endform.                    " DISPLAY_ALV



*&--------------------------------------------------------------*
*&      Form  SET_FIELDCAT
*&---------------------------------------------------------------*
*       text
*----------------------------------------------------------------*
form set_fieldcat .

  call function 'REUSE_ALV_FIELDCATALOG_MERGE'
    exporting
      i_program_name         = sy-repid
      i_internal_tabname     = 'GT_ITAB'
      i_inclname             = sy-repid
    changing
      ct_fieldcat            = gt_slis_t_fieldcat_alv
    exceptions
      inconsistent_interface = 1
      program_error          = 2
      others                 3.

  loop at gt_slis_t_fieldcat_alv into gs_slis_fieldcat_alv.
    case gs_slis_fieldcat_alv-fieldname.
      when 'ARBGB'.
*        gs_slis_fieldcat_alv-hotspot = 'X'.
        gs_slis_fieldcat_alv-seltext_l = 'Message Class'.
        gs_slis_fieldcat_alv-seltext_m = 'Message Class'.
        modify gt_slis_t_fieldcat_alv from gs_slis_fieldcat_alv.
    endcase.
  endloop.

endform.                    " SET_FIELDCAT



*&-------------------------------------------------------------*
*&      Form  SELECT_DATA
*&---------------------------------------------------------------*
*       text
*----------------------------------------------------------------*
form select_data .

  select *
    into corresponding fields of table gt_itab
    from t100a
   where arbgb in s_arbgb.

  sort gt_itab by arbgb.

  read table gt_itab index transporting no fields.

endform.                    " SELECT_DATA



*&-------------------------------------------------------------*
*&      Form  SET_EVENT
*&--------------------------------------------------------------*
*       text
*-------------------------------------------------------------*
form set_event .

  data: ls_event type slis_alv_event.

* - FORM USER_COMMAND
  read table gt_events with key name = slis_ev_user_command
                       into ls_event.
  if sy-subrc eq 0.
    move   'USER_COMMAND' to ls_event-form.
    modify gt_events index sy-tabix from ls_event.
  endif.

endform.                    " SET_EVENT



*&------------------------------------------------------------------*
*&      Form  USER_COMMAND
*&------------------------------------------------------------------*
*       ##(REUSE_ALV_EVENTS_GET)## CALL# FORM ###.
*-------------------------------------------------------------------*
form user_command using  p_ucomm    like sy-ucomm
                         p_selfield type slis_selfield.

  case p_ucomm.
    when '&IC1'.
      read table gt_itab index p_selfield-tabindex.
      set parameter id 'MAG' field gt_itab-arbgb.
      call transaction 'SE91' and skip first screen.

*      perform call_transaction.
  endcase.

endform.                    "USER_COMMAND



*&-----------------------------------------------------------*
*&      FORM  EVENTTAB_BUILD
*&--------------------------------------------------------------*
form get_event_list using  p_events   type slis_t_event
                           p_alv_type type slis_list_type.

  call function 'REUSE_ALV_EVENTS_GET'
    exporting
      i_list_type = p_alv_type
    importing
      et_events   = p_events.

endform.                    " EVENTTAB_BUILD



*&-----------------------------------------------------------*
*&      Form  SET_LAYOUT
*&------------------------------------------------------------*
*       text
*--------------------------------------------------------------*
form set_layout .

  clear: gs_layout.
  gs_layout-zebra = 'X'.

endform.                    " SET_LAYOUT



*&------------------------------------------------------------*
*&      Form  CALL_TRANSACTION
*&--------------------------------------------------------------*
*       text
*--------------------------------------------------------------*
form call_transaction .

  clear: gs_options, gt_bdcdata[].
  gs_options-dismode = 'E'.
  gs_options-updmode = 'A'.

  perform bdc_dynpro using  'SAPLWBMESSAGES' '0100'.
  perform bdc_field  using  'BDC_CURSOR'     'RSDAG-ARBGB'.
  perform bdc_field  using  'BDC_OKCODE'     '=WB_DISPLAY'.
  perform bdc_field  using  'RSDAG-ARBGB'    gt_itab-arbgb.

  call transaction 'SE91'   using gt_bdcdata
                     options from gs_options
                    messages into gt_messtab.

endform.                    " CALL_TRANSACTION



*&----------------------------------------------------------*
*&      Form  bdc_DYNPRO
*&--------------------------------------------------------------*
*       text
*---------------------------------------------------------------*
form bdc_dynpro using   program dynpro.

  clear: gt_bdcdata.

  gt_bdcdata-program  = program.
  gt_bdcdata-dynpro   = dynpro.
  gt_bdcdata-dynbegin = 'X'.

  append gt_bdcdata.

endform.                    " bdc_DYNPRO



*&-----------------------------------------------------------*
*&      Form  bdc_FIELD
*&------------------------------------------------------------*
*       text
*------------------------------------------------------------*
form bdc_field using fnam fval.

  clear: gt_bdcdata.

  gt_bdcdata-fnam = fnam.
  gt_bdcdata-fval = fval.

  append gt_bdcdata.

endform.                    " bdc_FIELD

*&----------------------------------------------------------------*
*& Report  YRTEST0035
*&
*&----------------------------------------------------------------*
*&
*&
*&----------------------------------------------------------------*

report  yrtest0035.

  type-pools: wfcsr.

  data : lv_text type wfcsr_ui_popup_text.

  lv_text-titlebar = 'title'.
  lv_text-question = 'question'.

  data: gv_answer.

*-----------------------------------------------------------------*
end-of-selection.
*-----------------------------------------------------------------*
  call function 'WFCS_POPUP_YES_NO'
    exporting
      pi_ui_popup_text  = lv_text
    changing
      pe_answer         = gv_answer  "YES: 1 /  NO: 2
    exceptions
      error_using_popup = 1
      others            2.

   write: gv_answer.




'SAP > ABAP 개발' 카테고리의 다른 글

cx_root - Division by zero  (1) 2010.07.21
Message Class 조회  (1) 2010.07.21
SAPGUI_PROGRESS_INDICATOR - %  (2) 2010.07.19
PP - BOM Item List Function ( MAST STPO STKO )  (2) 2010.07.16
External Operating System Commands - SM49  (2) 2010.07.09

SAPGUI_PROGRESS_INDICATOR - %

SAP/ABAP 개발 2010. 7. 19. 11:48 Posted by KindKay



 *&----------------------------------------------------------------*
*& Report  YRTEST0034
*&
*&----------------------------------------------------------------*
*&
*&
*&----------------------------------------------------------------*

REPORT  YRTEST0034.

  include YRTEST0034top.
  include YRTEST0034f01.



*-----------------------------------------------------------------*
start-of-selection.
*-----------------------------------------------------------------*
  select *
    into corresponding fields of table gt_itab2
    from sflight.

  clear: gt_itab[], gt_itab.

  loop at gt_itab2.
    do 10000 times.
      move-corresponding gt_itab2 to gt_itab.
      append gt_itab.
    enddo.
  endloop.

*-----------------------------------------------------------------*
end-of-selection.
*-----------------------------------------------------------------*
  data: l_total type i.
  describe table gt_itab lines l_total.
  loop at gt_itab.
    l_totcnt  = l_totcnt + 1.
    l_totcnt2 = l_totcnt mod 10.
    if l_totcnt2 = 0.
      g_rate = sy-tabix / l_total * 100.
      perform display_rate.
    endif.
  endloop.

  write: 'End'.
 



*&----------------------------------------------------------------*
*&  Include           YRTEST0034F01
*&----------------------------------------------------------------*

*&----------------------------------------------------------------*
*&      Form  DISPLAY_RATE
*&----------------------------------------------------------------*
*       text
*-----------------------------------------------------------------*
form display_rate .

  data: l_text(50).

  concatenate g_rate '%' 'progressing ->' gt_itab-carrid
         into l_text separated by space.

  call function 'SAPGUI_PROGRESS_INDICATOR'  "Progress  Bar
    exporting
      percentage = g_rate
      text       = l_text      "
    exceptions
      others     1.

endform.                    " DISPLAY_RATE




Hi all,

There is three ttables stpo stko mast, i have to join them and display this fields

mast~matnr,
mast~werks,
mast~stlan,
mast~stlal,
stko~stlst,
stko~stlst,
stpo~posnr,
stpo~idnrk,
stpo~menge,
stpo~meins,
stpo~ausch,
stpo~lgort.

Can any body suggest me a way to do this, also after joining them i ve to display one report. In that very report we have to show the alternative bom no and corresponding components. Someone please show me a way.


Hi!

You might try out these fm-s:

CS_BOM_EXPL_MAT_V2
CABM_READ_BOM


Regards
Tamás

출처:  http://forums.sdn.sap.com/thread.jspa?threadID=647247

MKAL - Production Versions of Material

SAP 2010. 7. 15. 13:56 Posted by KindKay


'SAP' 카테고리의 다른 글

MM - PR User-exit  (3) 2010.09.13
PP - User-exit for planned order  (3) 2010.07.21
PP - SR_PP.pdf  (1) 2010.07.15
MTO (Make To Order)  (0) 2010.07.07
Calling WebServices from ABAP via HTTPS  (3) 2010.07.07

PP - SR_PP.pdf

SAP 2010. 7. 15. 07:09 Posted by KindKay

'SAP' 카테고리의 다른 글

MM - PR User-exit  (3) 2010.09.13
PP - User-exit for planned order  (3) 2010.07.21
MKAL - Production Versions of Material  (1) 2010.07.15
MTO (Make To Order)  (0) 2010.07.07
Calling WebServices from ABAP via HTTPS  (3) 2010.07.07

External Operating System Commands - SM49

SAP/ABAP 개발 2010. 7. 9. 11:20 Posted by KindKay





MTO (Make To Order)

SAP 2010. 7. 7. 16:28 Posted by KindKay

 

MTO (Make to Order) is a manufacturing process in which manufacturing starts only after a customer's order is received. Forms of MTO vary, for example, an assembly process starts when demand actually occurs or manufacturing starts with development planning.

Manufacturing after receiving customer's orders means to start a pull-type supply chain operation because manufacturing is performed when demand is confirmed, i.e. being pulled by demand. The opposite business model is to manufacture products for stock MTS (Make to Stock), which is push-type production. There are also BTO (Build to Order) and ATO (Assemble To Order) in which assembly starts according to demand.

There are various models for Make To Order. For example, in some cases, the process of assembling prepared parts starts when actual demand occurs. Or, in other cases, the production process starts with the obtaining of materials and parts, or further back from development designing (engineering).

Assembling after receiving a customer's orders is "ATO (Assemble To Order)" and starting with development designing is "ETO (Engineer To Order)". Construction by general contractors and plant construction by engineering companies are categorized as ETO.

Pull-type production, such as MTO, BTO, ATO, and ETO, is a business model of the assembly industry in which the quantity to produce per product specification is one or only a few. For example, construction, plant construction, aircraft, vessels, bridges, and so on. From the viewpoint of supply chain management, it has been proven that those who can satisfy due dates promised with customers and can shorten lead times will have an competitive advantage. Even if the production quantity increases, if push-type products that are manufactured by MTS can be manufactured by pull-type production such as MTO and ATO models using SCM software or information technology, then there will be greater business opportunities.

ATO (Assemble To Order) of computers by Dell Inc. and production of sports bicycle by National Bicycle Industrial Co., Ltd. are examples of creating a new business model by matching the diversification of products with ATO, BTO, ETO, and with new-style marketing.
National Bicycle Industrial Co., Ltd. says
"We can deliver a custom-made bicycle to you within two weeks."
Solectron Corporation says
"We can assemble the computer you requested and deliver it within a week."
These are examples of business models in which new supply chain models are created as marketing models.

출처: http://www.lean-manufacturing-japan.com/scm-terminology/mto-make-to-order.html

'SAP' 카테고리의 다른 글

MM - PR User-exit  (3) 2010.09.13
PP - User-exit for planned order  (3) 2010.07.21
MKAL - Production Versions of Material  (1) 2010.07.15
PP - SR_PP.pdf  (1) 2010.07.15
Calling WebServices from ABAP via HTTPS  (3) 2010.07.07