SCC1 - Copy by Transport Request

SAP 2010. 11. 24. 11:56 Posted by KindKay

'SAP' 카테고리의 다른 글

SAP Event  (5) 2011.01.17
Scheduling background job by triggering an event  (0) 2011.01.17
ALV Buffer Reset  (1) 2010.11.16
PP - Long-Term Planning  (2) 2010.09.22
Frequently Used Tables  (1) 2010.09.20

Search help exit

SAP/ABAP 개발 2010. 11. 17. 09:50 Posted by KindKay





  function zpp_wooden_f4_help_exit.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCT
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     REFERENCE(SHLP) TYPE  SHLP_DESCR
*"     REFERENCE(CALLCONTROL) TYPE  DDSHF4CTRL
*"----------------------------------------------------------------------

  data: lv_matnr  type matnr,
        lv_aufnr  type aufnr,
        lv_maktx  type maktx,
        lv_inch   like ztpp1140-inch01,
        lv_width  like ztpp1140-width01,
        lv_height like ztpp1140-height01,
        lv_char.

  clear: lv_matnr, lv_maktx, lv_aufnr.

  case sy-tcode.
    when 'CO01' or 'CO01' or 'CO01'.
      get parameter id 'MAT' field lv_matnr.
      get parameter id 'ANR' field lv_aufnr.

    when others.
      clear: lv_matnr, lv_maktx, lv_aufnr.
  endcase.

  if callcontrol-step = 'PRESEL1'.
    clear: g_check_first.
    return.
  endif.

  check lv_matnr is not initial or lv_aufnr is not initial.

  if lv_matnr is initial.
    select single matnr
      into lv_matnr
      from afpo
     where aufnr eq lv_aufnr.
  endif.

  select single maktx
    into lv_maktx
    from makt
   where matnr eq lv_matnr
     and spras eq sy-langu.

  if lv_maktx cs 'RTC'.
    clear: lv_char.
    call function 'ZPP_GETCHAR_SHIFT_LEFT'
      exporting
        i_matnr       = lv_matnr
        i_left        = 5
      importing
        e_char        = lv_char.

    if lv_char ne 'E'.
      clear: record_tab[].
      return.
    endif.
  else.
    clear: record_tab[].
    return.
  endif.

  call function 'F4UT_OPTIMIZE_COLWIDTH'
    tables
      shlp_tab = shlp_tab
      record_tab = record_tab
    changing
      shlp = shlp
      callcontrol = callcontrol.

  data: lt_ztpp1130   like table of ztpp1130 with header line,
        ls_record_tab like seahlpres.

  data: lt_ddshselops type table of ddshselopt.

  if callcontrol-step = 'SELECT'.
    perform get_characteristic using lv_matnr
                            changing lv_inch
                                     lv_width
                                     lv_height.

    clear: lt_ddshselops[].
    lt_ddshselops[] = shlp-selopt[].

    if lt_ddshselops[] is initial and g_check_first is initial.
      if lv_inch is not initial.
        perform append_model_selopt  tables lt_ddshselops
                                      using 'INCH01' lv_inch.

        perform append_model_selopt  tables lt_ddshselops
                                      using 'WIDTH01' lv_width.

        perform append_model_selopt  tables lt_ddshselops
                                      using 'HEIGHT01' lv_height.
      endif.

      shlp-selopt[] = lt_ddshselops[].
      g_check_first = 'X'.
    endif.

  endif.

endfunction.

WHERE - (cond_syntax)

SAP/ABAP 개발 2010. 11. 17. 08:15 Posted by KindKay

    data: cond_syntax type string.

  clear: cond_syntax

  case pa_werks.
    when 'P100'.
      lr_vstel-low = 'H110'.
      concatenate ' ( D~AUART LIKE ' '''' 'ZCD%' ''''
             into cond_syntax.
      concatenate cond_syntax 'OR D~AUART LIKE ' '''' 'ZEX%' ''''
             into cond_syntax.
      concatenate cond_syntax 'OR D~AUART LIKE ' '''' 'ZFB%' ''''
             into cond_syntax.
      concatenate cond_syntax 'OR D~AUART LIKE ' '''' 'ZFD%' ''''
             into cond_syntax.
      concatenate cond_syntax 'OR D~AUART LIKE ' '''' 'ZOR%' '''' ' )'
             into cond_syntax.
    when 'P200'.
      lr_vstel-low = 'H210'.
      concatenate ' D~AUART EQ ' '''' 'ZA1' ''''
             into cond_syntax.
  endcase.

  select a~edatu c~kunnr  a~vbeln a~posnr b~route
         b~matnr b~kwmeng b~zieme b~werks a~wmeng
    into corresponding fields of table gt_base
    from vbep as a inner join vbap as b
                           on a~vbeln eq b~vbeln
                          and a~posnr eq b~posnr
                   inner join vbpa as c
                           on a~vbeln eq c~vbeln
                          and c~parvw eq 'WE'     "Ship-to-party(SH)
                   inner join vbak as d
                           on a~vbeln eq d~vbeln
                   inner join mara as e
                           on b~matnr eq e~matnr
   where a~edatu in s_edatu
     and a~vbeln in s_vbeln
     and b~matnr in s_matnr
     and c~kunnr in s_kunnr
     and b~kwmeng ne ''
     and (cond_syntax).


ALV Buffer Reset

SAP 2010. 11. 16. 13:32 Posted by KindKay

you can reset the buffers of a SAP system with the following codes:

/$TAB -> reset table buffer
/$SYNC -> reset all buffers


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


'SAP' 카테고리의 다른 글

Scheduling background job by triggering an event  (0) 2011.01.17
SCC1 - Copy by Transport Request  (1) 2010.11.24
PP - Long-Term Planning  (2) 2010.09.22
Frequently Used Tables  (1) 2010.09.20
MM - PR User-exit  (3) 2010.09.13

Use these FM.

SCP_REPLACE_STRANGE_CHARS

SF_SPECIALCHAR_DELETE

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

Search help exit  (1) 2010.11.17
WHERE - (cond_syntax)  (3) 2010.11.17
ALV Object Model - Simple 2D Table - The Basics  (1) 2010.11.04
ABAP Code Sample for ALV Grid  (1) 2010.11.03
ABAP ALV Grid Control  (1) 2010.11.02

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

WHERE - (cond_syntax)  (3) 2010.11.17
Function Module to handle Special Character (특수문자 관련)  (1) 2010.11.05
ABAP Code Sample for ALV Grid  (1) 2010.11.03
ABAP ALV Grid Control  (1) 2010.11.02
NUMBER RANGE 사용법  (2) 2010.10.31

ABAP Code Sample for ALV Grid

SAP/ABAP 개발 2010. 11. 3. 17:04 Posted by KindKay

ABAP ALV Grid Control

SAP/ABAP 개발 2010. 11. 2. 20:32 Posted by KindKay

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

ALV Object Model - Simple 2D Table - The Basics  (1) 2010.11.04
ABAP Code Sample for ALV Grid  (1) 2010.11.03
NUMBER RANGE 사용법  (2) 2010.10.31
Class ALV - Subtotal Text  (1) 2010.10.13
ZPPA_GET_GR_HISTORY bk20090915  (1) 2010.10.04

NUMBER RANGE 사용법

SAP/ABAP 개발 2010. 10. 31. 02:29 Posted by KindKay



1. NUMBER RANGE DEFINE.
   T-CODE : SNUM.

2. NUMBER RANGE 를 IMG처럼 만들기.
   매개변수 트랜잭션을 만든다.  SNUM을 사용하여 만듬.

 


2. NUMBER RANGE 적용 번호 따기.
   FUNCTION

   call function 'NUMBER_GET_NEXT'   
       exporting
            nr_range_nr             = 'VH'     --> 번호범위 지정시 설정.
            object                  = 'ZSVH'   --> 1번에서 지정.
       importing
            number                  = zvh10-hcbel
       exceptions
            interval_not_found      = 1
            number_range_not_intern = 2
            object_not_found        = 3
            quantity_is_0           = 4
            quantity_is_not_1       = 5
            interval_overflow       = 6
            others                  = 7.

3. NUMBER RANGE 조회하기. - 외부 지정인 경우 점검.
   FUNCTION  'NUMBER_GET_INFO'  " NUMBER RANGE 정보 읽어오기

   FUNCTION  'NUMBER_CHECK'     " NUMBER RANGE 점검.
     Import 매개변수                 값
        NR_RANGE_NR                     MS
        NUMBER                          SJ20050001
        OBJECT                          ZBUNDL
        SUBOBJECT
        TOYEAR                          2005
        NUMERIC_CHECK
     Export 매개변수                 값
        RETURNCODE                      X.
   RETURNCODE값이 'X'이면 NUMBER RANGE가 오류이다.

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

ABAP Code Sample for ALV Grid  (1) 2010.11.03
ABAP ALV Grid Control  (1) 2010.11.02
Class ALV - Subtotal Text  (1) 2010.10.13
ZPPA_GET_GR_HISTORY bk20090915  (1) 2010.10.04
[Function] DATE_GET_WEEK - 날자로 주 가져오기  (1) 2010.09.18

PP - Production Order Save User-exit

SAP/Project 2010. 10. 25. 01:19 Posted by KindKay

*&---------------------------------------------------------------------*
*&  Include           ZXCO1U06
*&---------------------------------------------------------------------*

*----------------------------------------------------------------------*
* DESCRIPTION      : CO02 Release(header_imp-flg_frei = 'X')시
*                    MES로 Interface 하기 위함.
* AUTHOR           : A539
* CREATE DATE      : 2010.09.07
*----------------------------------------------------------------------*

* Release 할 경우
  case header_imp-flg_frei.
    when 'X'.
*     CO02 릴리즈 작업후 데이타 발취를 위해 background task 로 처리
      call function 'ZPP_MESIF_PRODORDER_UPD_TASK'
        in background task as separate unit
        exporting
          i_caufvd    = header_imp.
  endcase.