Você está na página 1de 11

Functional & Technical Design

Title : Padronizao Nota de Cabealho na MIGO


Module : MM-IM
Development Type : On-line Transaction
`

Type examples
U : User Exit, Enhancement, Standard Modify
O : On-line Transaction
S : Script, (Smart)Form
R : Report
I : Interface(RFC)
M : Migration/Upload(including BDC)
F : Function

CSP IT Team

Overview
Program Title

Padronizao Nota de Cabealho na MIGO

Package

ZMMD

Program ID
SAP Transaction
Priority

High

Difficulty
Usage Frequency

Medium

Low

High

Medium

Low

Often

Daily

Weekly or more

Document Control
No.
1

Date of
modification
04-nov-2016

Description

Key User

Created

Contents
1. Overview
2. Functional Design (Detailed User Requirement)

IT

Consultant

Developer

A.Peruchi

J.Rezende

Bruno

SELECTION CRITERIA / USER INTERFACE


PROCESSING
RELATED TABLE/FIELD
RELATED PROGRAM (PROGRAM/TRANSACTION/MENU)
REPORT LAYOUT
DEPENDENCIES ()
SECURITY AND AUTHORIZATION CONSIDERATIONS
PERFORMANCE CONSIDERATIONS

3. Technical Design

PROCESS FLOW
DETAILED TECHNICAL DESCRIPTIONS
Selection Screen Layout (Report or Module Pool)
Report Layout (Report or Module Pool or ALV GRID)
Check Process ( or )
Main Process

1. Overview

Ao efetuar a entrada de mercadorias o usurio digita o nmero da nota fiscal. Esta melhoria visa
implementar uma validao para prevenir erros de processamento pelos usurios, e o preenchimento
automtico, caso a informao seja informado pelo LE, para minimizar o mximo possvel a digitao do
usurio no campo evitando erros de digitao da Nota Fiscal.

2. Functional Design (Detailed User Requirement)


Selection Criteria / User Interface

Pedido de Compras (ME22N)


No pedido o controle de confirmao (BSTAE) determina se dever haver aviso de recebimento para a
entrada de mercadorias. Se igual a 0004 Recebimento o aviso obrigatoriamente deve ser criado.

Entrada de Mercadorias: MIGO

Ao executar a entrada de mercadorias o standard permite a criao com referncia ao pedido (R01) ou ao
aviso de recebimento (R04)
- Entrada por pedido de compras

4 / 11

- Entrada por aviso de recebimento

Implementaes

1) Validao de referncia ao aviso de recebimento


Na MIGO, verificar se controle de confirmao (ekpo-bstae) igual a 0004. Se sim, deve ser obrigatrio efetuar
a entrada com referncia ao aviso de recebimento.
Verificar se CS_GOITEM-VLIEF_AVIS e CS_GOITEM-VBELP_AVIS so iniciais, se sim retornar mensagem abaixo:
PT: Pedido &1 Item &2, efetuar entrada com ref. aviso de recebimento.
EN: PO &1 item &2, goods rcpt. Based on inbound delivery mandatory.
2) Bloqueio de entrada de dados
Verificar se campo Nota de remessa (LFSNR) foi preenchido automaticamente na atribuio do aviso de
recebimento. Se sim o campo deve ser bloqueado para entradas (exibio).
3) Validao de entrada de dados
Se o campo Nota de remessa (LFSNR) no for preenchido pelo aviso de recebimento ele dever ser
preenchido manualmente pelo usurio. Validar que o usurio entre o dado no campo com a seguinte
5 / 11

formatao XXXXXXXXX-YYY, 9 dgitos a esquerda + hfen + 3 dgitos. Exemplo desta validao no LE.

Parmetro de controle

Verificar preenchimento da tabela ZABAPCONTROL conforme a especificao abaixo para validao na MIGO:

A validao s dever ser executada para o tipo de movimento 101.

Related Program(Program/Transaction/Menu)
MIGO Goods receipt

Security and Authorization Considerations ( )

n/a

3. Technical Design
Process Flow
N/A

6 / 11

Detailed Technical Descriptions

Check Process ( or )
N/A
Main Process

1. Field Exit FIELD_EXIT_LFSNR1


FUNCTION field_exit_lfsnr1.
*"---------------------------------------------------------------------*"*"Interface local:
*" IMPORTING
*"

REFERENCE(INPUT)

*" EXPORTING
*"

REFERENCE(OUTPUT)

*"---------------------------------------------------------------------DATA: lv_esquerda TYPE string.


DATA: lv_direita TYPE string.
DATA: lv_tamanho TYPE i.
IF input IS NOT INITIAL.
IF input CS '-'.
SPLIT input AT '-' INTO lv_esquerda lv_direita.
IF lv_esquerda IS INITIAL OR lv_direita IS INITIAL.
MESSAGE e078(zle001) WITH input.
ELSE.
lv_tamanho = strlen( lv_esquerda ).
IF lv_tamanho <> '9'.
MESSAGE e078(zle001) WITH input.
ELSE.
lv_tamanho = strlen( lv_direita ).
IF lv_tamanho <> '3'.
MESSAGE e078(zle001) WITH input.
ENDIF.
ENDIF.
ENDIF.
ELSE.
MESSAGE e078(zle001) WITH input.
ENDIF.
ENDIF.
ENDFUNCTION.
7 / 11

2. Tvarv ZMM_PADR_N_HEADER_MIGO
3. Function Group ZFGMM12

4. Enhancement

Point

ZEHMM0001

Includes LMIGOHG2, LMIGODM2 and LMIGOSO2.

8 / 11

5. Include - ZIMM0100
*** Local constants
CONSTANTS: lc_gohead TYPE char30
lc_goitem TYPE char30

VALUE '(SAPLMIGO)GOHEAD', "Screen

VALUE '(SAPLMIGO)GOITEM', "Screen

lc_godynpro TYPE char30

VALUE '(SAPLMIGO)GODYNPRO', "Screen

lc_bstae TYPE rvari_vnam


VALUE 'ZMM_PADR_N_HEADER_MIGO', "Tvarv
lc_action TYPE rvari_vnam
VALUE 'ZMM_PADR_N_HEADER_MIGO_2'. "Tvarv
*** Local FS
FIELD-SYMBOLS: <fs_gohead> TYPE gohead,
<fs_goitem> TYPE goitem,
<fs_godynpro> TYPE godynpro.
*** Local variables
DATA: lv_bstae TYPE ekpo-bstae.
*** Local Ranges
DATA: lr_bstae TYPE RANGE OF ekpo-bstae,
lr_action TYPE RANGE OF godynpro-action.
*** Getting standard screen status control
**** Assign the screen fields
ASSIGN (lc_gohead) TO <fs_gohead>.
ASSIGN (lc_goitem) TO <fs_goitem>.
ASSIGN (lc_godynpro) TO <fs_godynpro>.
*** Verify if the assign fields
IF <fs_gohead> IS ASSIGNED AND
<fs_goitem> IS ASSIGNED AND
<fs_godynpro> IS ASSIGNED.
*** Clear
CLEAR: lr_action[].
*** Get Values TVARV - ZMM_PADR_N_HEADER_MIGO_2
9 / 11

zcl_read_tvarv=>get_selection( EXPORTING im_name = lc_action


CHANGING re_range = lr_action ).
*** Get action values TVARV - ZMM_PADR_N_HEADER_MIGO_2
IF <fs_godynpro>-action IN lr_action AND
lr_action[]

IS NOT INITIAL.

*** Check if the fields is initial


IF <fs_goitem>-ebeln IS NOT INITIAL AND
<fs_goitem>-ebelp IS NOT INITIAL.
CLEAR: lv_bstae.
*** Get BSTAE field
SELECT SINGLE bstae
FROM ekpo
INTO lv_bstae
WHERE ebeln EQ <fs_goitem>-ebeln
AND ebelp EQ <fs_goitem>-ebelp.
IF sy-subrc = 0.
*** Clear
CLEAR: lr_bstae[].
*** Get Values TVARV - ZMM_PADR_N_HEADER_MIGO
zcl_read_tvarv=>get_selection( EXPORTING im_name = lc_bstae
CHANGING re_range = lr_bstae ).
*** Verify if exist in Tvarv
IF lv_bstae IN lr_bstae AND
lr_bstae[] IS NOT INITIAL.
*** Only in this screen
IF sy-dynnr EQ '0110'.
*** Check field fill
IF <fs_gohead>-lfsnr IS NOT INITIAL .
*** Block the field in the screen
LOOP AT SCREEN .
IF screen-name = 'GOHEAD-LFSNR'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
*** Check fields fill
IF <fs_goitem>-vlief_avis IS INITIAL AND
10 / 11

<fs_goitem>-vbelp_avis IS INITIAL.
*** Only in this screen - PBO
IF sy-dynnr EQ '0310'.
*PT: Pedido &1 Item &2, efetuar entrada com ref. aviso de recebimento.
*EN: PO &1 item &2, goods rcpt. Based on inbound delivery mandatory.
MESSAGE s072(zmmd1) WITH <fs_goitem>-ebeln
<fs_goitem>-ebelp
DISPLAY LIKE 'E'.
EXIT.
ENDIF.
*** Only in this screen - PAI
IF sy-dynnr EQ '0110'.
*PT: Pedido &1 Item &2, efetuar entrada com ref. aviso de recebimento.
*EN: PO &1 item &2, goods rcpt. Based on inbound delivery mandatory.
MESSAGE e072(zmmd1) WITH <fs_goitem>-ebeln
<fs_goitem>-ebelp.
EXIT.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
*** Desassign the FS
IF <fs_gohead> IS ASSIGNED.
UNASSIGN <fs_gohead>.
ENDIF.
IF <fs_goitem> IS ASSIGNED.
UNASSIGN <fs_goitem>.
ENDIF.
IF <fs_godynpro> IS ASSIGNED.
UNASSIGN <fs_godynpro>.
ENDIF.
ENDIF.

11 / 11

Você também pode gostar