quinta-feira, 29 de janeiro de 2015

RK_SE16N NA SE38

Dica rápida!!!

 

Apenas a título de informação, existem clientes que bloqueiam o acesso à "SE37″ e "SE16N"/"N", porém, geralmente, não limitam a SE38…
Uma solução rápida, seria executar o programa RK_SE16N 

 

quarta-feira, 28 de janeiro de 2015

Aff que lutaaaaa!!!!

Mais um artigo em auxílio dos que buscam a subversão.

 

Espiões, reparem como editar uma tabela que não pode (e provavelmente não deve) ser editada. Apresento-vos 3 técnicas.

 

A primeira já caducou há anos, a segunda está em vias de caducar e a terceira vamos ver quando caducará.

 

1. SE16 /H OK_CODE EDIT
O primeiro sistema é já do século XX e usar a velha transacção SE16.

na transacção SE16 escolhe a tabela a editar

selecciona os dados e vai para o detalhe de um dos registos

/H para debug

muda o valor da variável OK_CODE para “EDIT”

F8 para continuar

Se tudo tiver corrido bem agora o registo está editável. Depois é só gravar.

 

2. SE16N &sap_edit

na transacção SE16N escolhe a tabela a editar

selecciona os dados se quiseres filtrar registos

no campo da transacção escreve &sap_edit e enter

F8 para ires para a lista de dados

Um Service Pack recente da SAP inibe esta técnica. Se, com um bocado de sorte, o teu sistema estiver desactualizado, agora o registo está editável. Depois é só gravar. Se não der, experimenta a mesma coisa mas com a transacção UASE16N ao invés.

 

3. Função SE16N_INTERFACE

transacção SE37, função SE16N_INTERFACE

F8 para testar

parâmetros:

I_TAB = KNA1 :-)

I_EDIT = X

I_SAPEDIT = X

IT_SELFIELDS preenchido opcionalmente para restringir os registos a editar

novamente F8 para executar

Se tudo tiver corrido bem agora aparece uma lista de registos editável. Depois é só gravar.

Vá, agora não comeces para aí a sabotar tabelas como se não houvesse amanhã!

 

Congratulations abapinho.com

sexta-feira, 14 de novembro de 2014

DESCOBRIR REQUEST SE10 POR OUTRA REQUEST

Faça uma request atualizando a tabela e use a SE10 para localizar (simples) mas ajuda muito!

 

 

 

AVISO LEGAL

"As informações existentes nesta mensagem e nos arquivos anexados têm caráter confidencial e são para uso restrito. A utilização, divulgação, cópia ou distribuição desta mensagem, ou parte dela, por qualquer pessoa diferente do destinatário é proibida, sujeitando o infrator às sanções legais. Se esta mensagem foi recebida por engano, favor excluí-la e informar ao remetente pelo endereço eletrônico acima. Agradecemos sua cooperação."

DISCLAIMER

"This email and its attachments may contain privileged and/or confidential information. Use, disclosure, copying or distribution of this message, or part thereof, by anyone other than the intended recipient is strictly prohibited, and will submit the infractor to the legal sanctions. If you have received this email in error, please notify the sender by reply email and destroy all copies of this message. Thank you for your cooperation."

terça-feira, 30 de setembro de 2014

Tabela 'T100' não contém nenhuma entrada para J1B_NFE 603 - NOTA SAP 1993419

Tabela 'T100' não contém nenhuma entrada para J1B_NFE 603 – NOTA SAP 1993419

 

E lembre toda vez que existir uma regra de validação apontando para uma mensagem, esta mensagem dever estar cadastrada na SE91 -> J1B_NFE 603.

 

Erro erro e erro... aff

 

 

O que o pré requesito não aplicado não faz!!!!

 

Dentro da BAPI create NF

 

CALL FUNCTION 'BAPI_J_1B_NF_CREATEFROMDATA' (linha 954)

PERFORM check_nf_bapi  (linha 551)

CALL FUNCTION 'CHECK_DOMAIN_VALUES' (linha 894)

 

Regra de validação

 

Include - LJ1BBF2G

 

* Begin validations --> Note 1993419                        "1993419
  
IF wk_header-nfe 'X'.                                   "1993419
*   Always: NF-e: Check if Payment Form is valid in the     "1993419
*     domain values.                                        "1993419
    
CALL FUNCTION 'CHECK_DOMAIN_VALUES'                     "1993419
      
EXPORTING                                             "1993419
        domname       
'J_1B_PAY_FORM_IND' "#EC NEEDED     "1993419
        
value         wk_header-indpag                    "1993419
      
EXCEPTIONS                                            "1993419
        no_domname    
1                                   "1993419
        wrong_value   
2                                   "1993419
        dom_not_found 
3                                   "1993419
        
OTHERS        4.                                  "1993419
    
IF sy-subrc <> 0.                                       "1993419
       subrc 
8.                                           "1993419
       
PERFORM bapireturn_fill                              "1993419
         
USING 'J1B_NFE' 'E' '602'                          "1993419
               wk_header
-indpag space space space           "1993419
         
CHANGING return[].                                 "1993419
    
ENDIF.                                                  "1993419
                                                            
"1993419
*   Always: NF-e: Check if Freight mode is valid in the     "1993419
*     domain values.                                        "1993419
    
CALL FUNCTION 'CHECK_DOMAIN_VALUES'                     "1993419
      
EXPORTING                                             "1993419
        domname       
'J_1B_FREIGHT_MODE' "#EC NEEDED     "1993419
        
value         wk_header-modfrete                  "1993419
      
EXCEPTIONS                                            "1993419
        no_domname    
1                                   "1993419
        wrong_value   
2                                   "1993419
        dom_not_found 
3                                   "1993419
        
OTHERS        4.                                  "1993419
    
IF sy-subrc <> 0.                                       "1993419
       subrc 
8.                                           "1993419
       
PERFORM bapireturn_fill                              "1993419
         
USING 'J1B_NFE' 'E' '603'                          "1993419
               wk_header
-modfrete space space space         "1993419
         
CHANGING return[].                                 "1993419
    
ENDIF.                                                  "1993419
                                                            
"1993419
*   Always: NF-e: Check if NF-e Final Consumer Indicator    "1993419
*     is valid in the domain values.                        "1993419
    
CALL FUNCTION 'CHECK_DOMAIN_VALUES'                     "1993419
      
EXPORTING                                             "1993419
        domname       
'J_1BNFE_INDFINAL' "#EC NEEDED      "1993419
        
value         wk_header-ind_final                 "1993419
      
EXCEPTIONS                                            "1993419
        no_domname    
1                                   "1993419
        wrong_value   
2                                   "1993419
        dom_not_found 
3                                   "1993419
        
OTHERS        4.                                  "1993419
    
IF sy-subrc <> 0.                                       "1993419
       subrc 
8.                                           "1993419
       
PERFORM bapireturn_fill                              "1993419
         
USING 'J1B_NFE' 'E' '604'                          "1993419
               wk_header
-ind_final space space space        "1993419
         
CHANGING return[].                                 "1993419
    
ENDIF.                                                  "1993419
                                                            
"1993419
*   Always: NF-e: Check if NF-e Customer Presence Indicator "1993419
*     is valid in the domain values.                        "1993419
    
CALL FUNCTION 'CHECK_DOMAIN_VALUES'                     "1993419
      
EXPORTING                                             "1993419
        domname       
'J_1BNFE_INDPRES' "#EC NEEDED       "1993419
        
value         wk_header-ind_pres                  "1993419
      
EXCEPTIONS                                            "1993419
        no_domname    
1                                   "1993419
        wrong_value   
2                                   "1993419
        dom_not_found 
3                                   "1993419
        
OTHERS        4.                                  "1993419
    
IF sy-subrc <> 0.                                       "1993419
       subrc 
8.                                           "1993419
       
PERFORM bapireturn_fill                              "1993419
         
USING 'J1B_NFE' 'E' '605'                          "1993419
               wk_header
-ind_pres space space space         "1993419
         
CHANGING return[].                                 "1993419
    
ENDIF.                                                  "1993419
                                                            
"1993419
*   Always: NF-e: Check if the Process origin indicator     "1993419
*     is valid in the domain values.                        "1993419
    
LOOP AT wk_ref_proc.                                    "1993419
      
CALL FUNCTION 'CHECK_DOMAIN_VALUES'                   "1993419
        
EXPORTING                                           "1993419
          domname       
'J_1BNF_PROC_ORIGIN' "#EC NEEDED  "1993419
          
value         wk_ref_proc-indproc               "1993419
        
EXCEPTIONS                                          "1993419
          no_domname    
1                                 "1993419
          wrong_value   
2                                 "1993419
          dom_not_found 
3                                 "1993419
          
OTHERS        4.                                "1993419
      
IF sy-subrc <> 0.                                     "1993419
         subrc 
8.                                         "1993419
         
PERFORM bapireturn_fill                            "1993419
           
USING 'J1B_NFE' 'E' '608'                        "1993419
                 wk_ref_proc
-indproc space space space      "1993419
           
CHANGING return[].                               "1993419
      
ENDIF.                                                "1993419
    
ENDLOOP.                                                "1993419
                                                            
"1993419
*   Always: NF-e: Check if the Account number is valid on   "1993419
*     table ska1.                                           "1993419
    
CLEAR lv_ktopl.                                         "1993419
    
SELECT SINGLE ktopl                                     "1993419
      
INTO lv_ktopl                                         "1993419
      
FROM t001                                             "1993419
     
WHERE bukrs wk_header-bukrs.                         "1993419
                                                            
"1993419
    
LOOP AT wk_item.                                        "1993419
      
IF NOT wk_item-cod_cta IS INITIAL.                    "1993419
        
SELECT SINGLE saknr                                 "1993419
          
INTO lv_saknr                                     "1993419
          
FROM ska1                                         "1993419
         
WHERE ktopl  lv_ktopl                            "1993419
           
AND saknr  wk_item-cod_cta.                    "1993419
        
IF sy-subrc <> 0.                                   "1993419
           subrc 
8.                                       "1993419
           
PERFORM bapireturn_fill USING  'F5' 'E' '106'    "1993419
               wk_item
-cod_cta wk_header-bukrs space space  "1993419
             
CHANGING return[].                             "1993419
        
ENDIF.                                              "1993419
      
ENDIF.                                                "1993419
    
ENDLOOP.                                                "1993419
                                                            
"1993419
*   Always: NF-e: Check if the Regions in transport         "1993419
*     tabstrip is valid in the table T005S.                 "1993419
    
CLEAR ls_addr1_val.                                     "1993419
    
CALL FUNCTION 'J_1B_BRANCH_READ'                        "1993419
      
EXPORTING                                             "1993419
        branch                  
wk_header-branch          "1993419
        company                 
wk_header-bukrs           "1993419
     
IMPORTING                                              "1993419
       address_value           
ls_addr1_val               "1993419
     
EXCEPTIONS                                             "1993419
       branch_not_found        
1                          "1993419
       address_not_found       
2                          "1993419
       company_not_found       
3                          "1993419
       
OTHERS                  4.                         "1993419
                                                            
"1993419
    
IF sy-subrc 0.                                        "1993419
      
IF NOT wk_header-uf1 IS INITIAL.                      "1993419
        
SELECT SINGLE mandt                                 "1993419
          
INTO lv_dummy                                     "1993419
          
FROM t005s                                        "1993419
         
WHERE land1 ls_addr1_val-country                 "1993419
           
AND bland wk_header-uf1.                       "1993419
                                                            
"1993419
        
IF sy-subrc <> 0.                                   "1993419
          subrc 
8.                                        "1993419
          
PERFORM bapireturn_fill                           "1993419
            
USING 'J1B_NFE' 'E' '607'                       "1993419
              wk_header
-uf1 ls_addr1_val-country            "1993419
              space space                                   
"1993419
            
CHANGING return[].                              "1993419
        
ENDIF.                                              "1993419
      
ENDIF.                                                "1993419
                                                            
"1993419
      
IF NOT wk_header-ufembarq IS INITIAL.                 "1993419
        
SELECT SINGLE mandt                                 "1993419
          
INTO lv_dummy                                     "1993419
          
FROM t005s                                        "1993419
         
WHERE land1 ls_addr1_val-country                 "1993419
           
AND bland wk_header-ufembarq.                  "1993419
                                                            
"1993419
        
IF sy-subrc <> 0.                                   "1993419
          subrc 
8.                                        "1993419
          
PERFORM bapireturn_fill                           "1993419
            
USING 'J1B_NFE' 'E' '607'                       "1993419
              wk_header
-ufembarq ls_addr1_val-country       "1993419
              space space                                   
"1993419
            
CHANGING return[].                              "1993419
        
ENDIF.                                              "1993419
      
ENDIF.                                                "1993419
                                                            
"1993419
      
LOOP AT wk_trailer_info.                              "1993419
        
IF NOT wk_trailer_info-veh_uf IS INITIAL.           "1993419
          
SELECT SINGLE mandt                               "1993419
            
INTO lv_dummy                                   "1993419
            
FROM t005s                                      "1993419
           
WHERE land1 ls_addr1_val-country               "1993419
             
AND bland wk_trailer_info-veh_uf.            "1993419
                                                            
"1993419
          
IF sy-subrc <> 0.                                 "1993419
            subrc 
8.                                      "1993419
            
PERFORM bapireturn_fill                         "1993419
              
USING 'J1B_NFE' 'E' '607'                     "1993419
                wk_trailer_info
-veh_uf ls_addr1_val-country "1993419
                space space                                 
"1993419
              
CHANGING return[].                            "1993419
          
ENDIF.                                            "1993419
        
ENDIF.                                              "1993419
      
ENDLOOP.                                              "1993419
                                                            
"1993419
    
ELSE.                                                   "1993419
      subrc 
8.                                            "1993419
      
PERFORM bapireturn_fill                               "1993419
        
USING 'J1B_NFE' 'E' '606'                           "1993419
          space space space space                           
"1993419
        
CHANGING return[].                                  "1993419
    
ENDIF.                                                  "1993419
  
ENDIF.                                                    "1993419
* End validations <-- Note 1993419                          "1993419

 

 

AVISO LEGAL

"As informações existentes nesta mensagem e nos arquivos anexados têm caráter confidencial e são para uso restrito. A utilização, divulgação, cópia ou distribuição desta mensagem, ou parte dela, por qualquer pessoa diferente do destinatário é proibida, sujeitando o infrator às sanções legais. Se esta mensagem foi recebida por engano, favor excluí-la e informar ao remetente pelo endereço eletrônico acima. Agradecemos sua cooperação."

DISCLAIMER

"This email and its attachments may contain privileged and/or confidential information. Use, disclosure, copying or distribution of this message, or part thereof, by anyone other than the intended recipient is strictly prohibited, and will submit the infractor to the legal sanctions. If you have received this email in error, please notify the sender by reply email and destroy all copies of this message. Thank you for your cooperation."