There are 8 bits in a byte. There is No Shortcut to be A Great ABAP Programmer and It's Applies to All.
Showing posts with label Function. Show all posts
Showing posts with label Function. Show all posts
Thursday, September 22, 2016
Wednesday, December 24, 2014
Hide Button or Icon in the ABAP Report
Below is the code snippet
Function : 'RS_SET_SELSCREEN_STATUS' .
FORM remove_dynamic_sel .
DATA: t_exclude TYPE STANDARD TABLE OF sypfkey.
APPEND 'DYNS' TO t_exclude.
"DYNS is the dynamic selection screen function code.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = t_exclude.
ENDFORM.
Monday, September 29, 2014
Changing Customer Master Data for Payment Term
There are situation that you need to edit the Customer Master Data in SAP.
In this situation, we want to edit the payment term in of the customer under Company Data.
Basically before you are trying to use any BAPI that changing the data, run the BAPI that get the detail from the system. As for this I'm using BAPI_CUSTOMER_GETDETAIL1.
In this BAPI you will need to enter the appropriate data to get the detail of the Customer.
In this situation, we want to edit the payment term in of the customer under Company Data.
Basically before you are trying to use any BAPI that changing the data, run the BAPI that get the detail from the system. As for this I'm using BAPI_CUSTOMER_GETDETAIL1.
In this BAPI you will need to enter the appropriate data to get the detail of the Customer.
Then you will get the data of that specific customer
Based on the data that you receive follow that and fill up in the BAPI_CUSTOMER_CHANGEFROMDATA1.
IMPORTANT to change the data, you need to fill up in PI_PERSONALDATA field LASTNAME, CITY, COUNTRY, COUNTRYISO, LANGUP, LANGUP_ISO, CURRENCY, CURRENCY_ISO.
And the field that you need to change (in this case we changing Payment Term). Fill up the first PI_OPT_PERSONALDATA. In that table you just need to fill up the field that you want to change (Payment Term) and also table below it PI_OPT_PERSONALDATAX.
Then fill up the SALESORG, DIVISION, DIVISION_CHANNEL and CUSTOMER No.. Then run it.
If the return is 000, then you BAPI is execute with no error and now you can check using tcode XD03.
Have Fun...!! :)
Tuesday, March 26, 2013
Report Indicator
We using function 'SAPGUI_PROGRESS_INDICATOR'
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = P_PERCENT
TEXT = P_TEXT
.
Friday, October 12, 2012
Concatenate with Blank Space
There is few ways to concatenate with blank space if we google it out.
Below is the classic example.
Rules:
- Make sure the variable field is in the correct length.
Below is the code snippet.
CONCATENATE sy-mandt wa_po-ebeln wa_po-ebelp INTO tp_tabkey RESPECTING BLANKS
Others way is using class CL_ABAP_CONTAINER_UTILITIES. If you want to set the space based on others data type. Below is the code snippet.
FORM insert_space USING p_ebeln TYPE ekko-ebeln
CHANGING tp_ebeln.
CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
EXPORTING
IM_VALUE = p_ebeln
IMPORTING
EX_CONTAINER = tp_ebeln.
* EXCEPTIONS
* ILLEGAL_PARAMETER_TYPE = 1
* others = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Wednesday, May 16, 2012
Sunday, September 25, 2011
CSV: Comma Delimited
Use the Function Module SAP_CONVERT_TO_CSV_FORMAT
to convert the internal table into Comma seperated format then download this
to convert the internal table into Comma seperated format then download this
Subscribe to:
Posts (Atom)

