Показаны сообщения с ярлыком ABAP. Показать все сообщения
Показаны сообщения с ярлыком ABAP. Показать все сообщения

среда, 19 августа 2015 г.

USER EXIT PDATE

All, I would appreciate your help to find the user exit PDATE in SCM 7.

I am planning to use the Planning Start Date field TBID_START field to dynamically recalculate a data view start date.
The SAP Help on this field identifies the User Exit 'PDATE' for this purpose.  However, I am not able to find a PDATE user exit.

Answer:

In transaction SMOD enter PDATE and select display it will take you to the FM. Consult your ABAP expert to implement it. 

среда, 5 августа 2015 г.

Function Module to get address from adrc table

Is there any Function module which is retrieving data from ADRC table by passing address number.

Answer:

Check ADDR_GET , ADDR_COMM_GET , ADDR_GET_COMPLETE

Use this FM  RTP_US_DB_ADRC_READ

Source


  

вторник, 10 декабря 2013 г.

Encoding and decoding Base64


*Entschlüsselt einen BinaryString mit Base64

CALL FUNCTION 'SSFC_BASE64_DECODE'
EXPORTING
b64data                  = xstring
*      b64leng                  = gs_base64data-b64leng
*      b_check                  = ga_base64data-b_check
IMPORTING
bindata                  = string"ga_base64data-bindata
EXCEPTIONS
ssf_krn_error            = 1
ssf_krn_noop             = 2
ssf_krn_nomemory         = 3
ssf_krn_opinv            = 4
ssf_krn_input_data_error = 5
ssf_krn_invalid_par      = 6
ssf_krn_invalid_parlen   = 7
OTHERS                   = 8.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

*Verschlüsselt einen BinaryString mit Base64

*  DATA: la_xstring TYPE xstring,
*        la_string TYPE string.

CALL FUNCTION 'SSFC_BASE64_ENCODE'
EXPORTING
bindata                  = xstring
*      binleng                  = gs_base64data-b64leng
IMPORTING
b64data                  = string
EXCEPTIONS
ssf_krn_error            = 1
ssf_krn_noop             = 2
ssf_krn_nomemory         = 3
ssf_krn_opinv            = 4
ssf_krn_input_data_error = 5
ssf_krn_invalid_par      = 6
ssf_krn_invalid_parlen   = 7
OTHERS                   = 8.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. 

 
 
import org.apache.commons.codec.binary.Base64;

/**
 * Java program to encode and decode String in Java using Base64 encoding algorithm
 * @author http://javarevisited.blogspot.com
 */
public class Base64EncodingExample{

    public static void main(String args[]) throws IOException {
        String orig = "original String before base64 encoding in Java";

        //encoding  byte array into base 64
        byte[] encoded = Base64.encodeBase64(orig.getBytes());     
      
        System.out.println("Original String: " + orig );
        System.out.println("Base64 Encoded String : " + new String(encoded));
      
        //decoding byte array into base64
        byte[] decoded = Base64.decodeBase64(encoded);      
        System.out.println("Base 64 Decoded  String : " + new String(decoded));

    }
}


Output:
Original String: original String before base64 encoding in Java
Base64 Encoded String : b3JpZ2luYWwgU3RyaW5nIGJlZm9yZSBiYXNlNjQgZW5jb2RpbmcgaW4gSmF2YQ==
Base 64 Decoded  String : original String before base64 encoding in Java

Read more: http://javarevisited.blogspot.com/2012/02/how-to-encode-decode-string-in-java.html#ixzz2n4iBQBTN

вторник, 22 октября 2013 г.

Asychronous outbound Proxy test with SPROXY. Commit missing problem

in R/3 in SPROXY after executing your outbound proxy, go to menu Extras -> click on Trigger Commit Work.....then you will not get Commit missing in SXMB_MONI for your msg..........

Или добавить COMMIT WORK в код прокси.

понедельник, 4 марта 2013 г.

The row structure of the table is incorrect. Using range tables.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
*use a ranges table in this case.
 
FUNCTION Z_CHANGE_EBAKZ_FLAG.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  CHANGING
*"     VALUE(BANFTAB) TYPE  ZBANFN
*"----------------------------------------------------------------------
 
  data:lt_eban type table of eban.
  data:ls_eban type eban.
 
data: 
l_r_banfn type range of banfn,
l_wa_banfn like line of l_r_banfn,
l_wa_banftab like likne of BANFTAB.

loop at banftab into l_wa_banftab.
l_wa_banfn-sign = 'I'.
l_wa_banfn-option = 'EQ'.
l_wa_banfn-low = l_wa_banftab-banfn.
append l_wa_banfn to l_r_banfn.
clear l_wa_banfn.
endloop. 

  SELECT * FROM eban into table lt_eban 
  where 
  BANFN IN L_R_BANFN "BANFN IN BANFTAB 
AND EBAKZ EQ 'X'.
 
  IF SY-SUBRC IS INITIAL.
    LOOP AT lt_eban INTO ls_eban .
      ls_eban-EBAKZ = ' '.
      modify eban from ls_eban.
    ENDLOOP.
  ENDIF.
ENDFUNCTION.
 
or you can use FOR ALL ENTRIES :
 
FUNCTION Z_CHANGE_EBAKZ_FLAG.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  CHANGING
*"     VALUE(BANFTAB) TYPE  ZBANFN
*"----------------------------------------------------------------------
 
  data lt_eban type table of eban.
  data ls_eban type eban.
 
 
  SELECT * FROM eban into table lt_eban 
  FOR ALL ENTRIES IN BANFTAB "--> Add this
  where BANFN = BANFTAB-BANFN
  AND EBAKZ EQ 'X'.
 
  IF SY-SUBRC IS INITIAL.
    LOOP AT lt_eban INTO ls_eban .
      ls_eban-EBAKZ = ' '.
      modify eban from ls_eban.
    ENDLOOP.
  ENDIF.
ENDFUNCTION.

пятница, 28 сентября 2012 г.

вторник, 11 сентября 2012 г.

Abap lessons


how to add a new field in migo transaction 



http://careerabap.blogspot.com/2011/02/implementing-screen-exits-for.html

пара моментов.

1. НЕ используйте CI_COBL, если хотите прорезать в MIGO. Используйте .APPEND в MSEG и прорезайте туда.

Вот линк, где шаг за шагом описывается процесс:
http://scn.sap.com/message/9867430#9867430





понедельник, 16 апреля 2012 г.