Mostrando entradas con la etiqueta sap. Mostrar todas las entradas
Mostrando entradas con la etiqueta sap. Mostrar todas las entradas
viernes, junio 17, 2011
miércoles, mayo 18, 2011
ABAP TRICKS: Find a BADI
There are some cases where we need to add some actions when a transaction is called or any action in SAP is done.
This is almost the BADI definition but in the major of the cases we are not able to know which BADI to change in order to have our customized behaviour for a determined action.
Well, following the following steps we will be able to identify the BADI that we will need to change:
Step 1: SE37 display Function Module - SXV_GET_CLIF_BY_NAME.
Step 2: Set a BREAKPOINT on call function SXV_ADD_PREFIX .
Step 3:In another SESSION run the desired transaction, parameter 'name' gives the BADI; parameter 'clif ' gives implementation, e.g. for TCode MIGO name = MB_MIGO_BADI, clif = CL_EX_MB_MIGO_BADI.
Let me know if this helps.
sábado, abril 16, 2011
reCAPTCHA & ABAP #verification process#
If we need to verify a reCAPTCHA by a SAP server we can use the following way to do it.
Good luck!
We should create a “HTTP Connection to External Server” by SM59 tcode.
It will look like:
The verification process would be:
DATA: http_dest TYPE rfcdest VALUE 'ZTEST_HTTP'.
DATA: client TYPE REF TO if_http_client.
DATA: request TYPE REF TO if_http_request,
rc TYPE sy-subrc,
http_rc TYPE sy-subrc,
xml_xstring TYPE xstring.
DATA: convin TYPE REF TO cl_abap_conv_in_ce,
l_data TYPE string.
START-OF-SELECTION.
cl_http_client=>create_by_destination( EXPORTING
destination = http_dest IMPORTING client = client ).
CALL METHOD client->request->set_method(
if_http_request=>co_request_method_post ).
*optional Request fields
CALL METHOD client->request->set_form_field
EXPORTING
name = 'privatekey'
value = 'your_privateKey'.
CALL METHOD client->request->set_form_field
EXPORTING
name = 'remoteip'
value = 'client_remote_ip'.
CALL METHOD client->request->set_form_field
EXPORTING
name = 'challenge'
value = 'the_challenge_id'.
CALL METHOD client->request->set_form_field
EXPORTING
name = 'response'
value = 'user_response'.
* send and receive
CALL METHOD client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
http_invalid_timeout = 4
OTHERS = 5.
IF sy-subrc <> 0.
RAISE connection_error.
ENDIF.
CALL METHOD client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
rc = sy-subrc. "error receive
IF rc = 0.
**http status code
client->response->get_status( IMPORTING code = http_rc ).
IF http_rc <> 200.
"""KO
ELSE. "status 200 ->>OK
CLEAR: xml_xstring.
xml_xstring = client->response->get_data( ).
* show the
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
encoding = 'UTF-8'
endian = 'L'
ignore_cerr = 'X'
replacement = '#'
input = xml_xstring " Xstring
RECEIVING
conv = convin.
CALL METHOD convin->read
IMPORTING
data = l_data. " String
WRITE l_data.
ENDIF.
ENDIF.
* VERY IMPORTANT: close your connection
client->close( ).
The possible results are going to be:
false#incorrect-captcha-sol
or
true
:)
lunes, septiembre 14, 2009
SAP en tu Mac

Hola a todos de nuevo, hoy toca guiñarle el ojo a ese programilla que uso tanto diariamente. Hablo de SAP. Tiempo atrás entré a trabajar con este software y lo primero que me encontré fue un portátil de la empresa con Windows XP. No es que yo sea un anti-windows(:@) pero la comodidad de trabajar con mi MBP no es la misma que en cualquier pc. Bueno pues para el que se lo había planteado, existe una solución SAP para Mac. Después del salto podéis ver una pequeña guía de instalación.
Un apunte para finalizar: ¿sabiáis que los pedidos de la Apple Store y de la iTunes store se tramitan utilizando SAP? Jake Logan, desarrollador senior de Apple IS & T tiene bastante que ver en eso, y estamos hablando de dar cobertura (y de la buena) a millones de usuarios, de clientes.
La instalación del GUI (Graphic User Interface / Interfaz Gráfico de Usuario) de SAP en Mac OS X no es excesivamente complicada.
- Descargamos la última versión del SAPGUI para Mac OS X (en estos momentos contamos con la 7.10r9, para que tengamos una referencia a partir de la versión 7.00 el SAPGUI para Java está soportado en Mac OS X 10.4 tanto para arquitecturas PowerPc como para Intel, de hecho la 7.10 ya está soportada por Mac OS X 10.5 y por Windows Vista.

- Una vez tenemos el archivo descargado en nuestro ordenador con un simple doble-click se ejecuta el instalador que, tras preguntarnos dónde queremos que se instale, nos devuelve un mensaje con la ruta dónde podremos encontrar el archivo *.log de la instalación (por si queremos asegurarnos de que todo ha ido bien).
- Perfecto. Sólo nos queda un último paso: hablar con la gente de SAP de nuestra empresa para que nos faciliten la información exacta de configuración en cuanto a conectividad, credenciales de acceso, servidores SAP, etcétera (a través en la mayoría de casos de un archivo de *.pref (preferencias) asociado a nuestro usuario).
Suscribirse a:
Entradas (Atom)