Wednesday, March 21, 2018

[SAP BASIS] Activated Structure with "Switched Off" status

SAP BASIS - Activated Structure with "Switched Off" status


[SAP ABAP] BAPI Example BAPI_INQUIRY_CREATEFROMDATA2 Part 2 (w/o voice)

Simplify "BAPI_INQUIRY_CREATEFROMDATA2"
Created by Albertus Reinandang
Date : 18.03.2018

Previous Tutorial, please watch first
https://www.youtube.com/watch?v=ZPrIWq41CZw

Step
1. Create Structure (SE11)
- Header
- Item
2. Create Function Group (SE37)
3. Create Function Module
4. Write Code according to logic at Video
https://www.youtube.com/watch?v=ZPrIWq41CZw
5. Test Function
6. Done



Source Code
>> Download <<

[SAP ABAP] BAPI Example BAPI_INQUIRY_CREATEFROMDATA2 (w/o voice)

Create Sales Inquiry

Created by Albertus Reinandang
Date : 18.03.2018

Step
1. Create manually VA11
2. Check Result
3. Open tCode BAPI or SE37->BAPI_INQUIRY_CREATEFROMDATA2
Schedule line is used for entry Order Quantity and Req Date.
Req Date is automatic if using VA11
4. Save data before test
if salesdocument is show then success
5. Run Test Sequence
6. Compare Result
7. Done



[SAP Tools] Count Table Content



"SAP GUI for HTML" without ABAP Programming Knowledge

"SAP GUI for HTML" without ABAP Programming Knowledge

Sumber :
- https://wiki.scn.sap.com/wiki/display/ATopics/SAP+GUI+Family
- https://wiki.scn.sap.com/wiki/display/HOME/Internet+Transaction+Server

Practice :
1. Basic - Basic Configuration
https://blogs.sap.com/2012/06/27/how-to-configure-web-gui-for-sap/

2. Basic - Custom Configuration
https://blogs.sap.com/2014/02/06/how-to-configure-your-sap-gui-html-for-web-access/

3. Advanced - Custom Logon Menu
https://blogs.sap.com/2015/09/15/edit-webui-log-in-screen-layout-html/

Friday, October 13, 2017

[SAP ABAP] Convert LIST MEMORY to HTML

FUNCTION zfmarein_list_to_html.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      T_HTML STRUCTURE  W3HTML
*"----------------------------------------------------------------------


  DATA li_tmp LIKE STANDARD TABLE OF abaplist WITH HEADER LINE,
           li_html LIKE STANDARD TABLE OF w3html WITH HEADER LINE.

  REFRESH t_html.

*  "Get Report Memory
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject li_tmp
    EXCEPTIONS
      not_found  4
      OTHERS     8.

  CALL FUNCTION 'WRITE_LIST'
    TABLES
      listobject li_tmp
    EXCEPTIONS
      empty_list 1
      OTHERS     2.

  CALL FUNCTION 'WWW_LIST_TO_HTML'
    TABLES
      html   li_html
    EXCEPTIONS
      OTHERS 1.

  t_html[] li_html[].



ENDFUNCTION.

[SAP ABAP] Remove XML BUGS

FUNCTION zfm_mmods_remove_xml_bugs .
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  CHANGING
*"     REFERENCE(C_XML) TYPE  STRING
*"----------------------------------------------------------------------


  TYPES BEGIN OF ty_data,
            line TYPE string,
          END OF ty_data.
  DATA li_data TYPE STANDARD TABLE OF ty_data WITH HEADER LINE.

  DATA lv_tmp TYPE string,
         lv_cell1 TYPE string,
         lv_cell2 TYPE string,
         lv_cell3 TYPE string,
         lv_cell_header TYPE string,
         lv_cell_top TYPE string,
         lv_cell_last TYPE string,
         lv_cell_replace TYPE string,
         lv_len1 TYPE i.

  "Header
  lv_cell_header ''.
  CONCATENATE lv_cell_header cl_abap_char_utilities=>cr_lf INTO lv_cell_replace.
  REPLACE lv_cell_header IN c_xml  WITH lv_cell_replace.

  "Top
  SPLIT c_xml AT '>' INTO lv_tmp lv_cell_top.
  SPLIT lv_cell_top AT '>' INTO lv_cell_top lv_tmp.
  CONCATENATE lv_cell_top '>' INTO lv_cell_top.
  CONCATENATE lv_cell_top cl_abap_char_utilities=>cr_lf INTO lv_cell_replace.
  REPLACE lv_cell_top IN c_xml  WITH lv_cell_replace.

  "Clear Last from note
  lv_len1 STRLENlv_cell_top 3.
  lv_cell_last lv_cell_top+3(lv_len1).
  CONCATENATE '</' lv_cell_last INTO lv_cell_last.
  CONCATENATE lv_cell_last lv_cell_last INTO lv_cell_last.

  SPLIT c_xml AT lv_cell_last INTO lv_cell1 lv_cell2.

  CLEAR c_xml.
  CONCATENATE lv_cell1 lv_cell_last INTO c_xml.


ENDFUNCTION.

[SAP BASIS] Activated Structure with "Switched Off" status

SAP BASIS - Activated Structure with "Switched Off" status