Below is the custom help for selection options we need to define s-low and s-high withe separated input help
SELECT t588b~massn
INTO CORRESPONDING FIELDS OF TABLE i_acthelp
FROM t588b
WHERE t588b~USERG = '14'
AND t588b~massn NE ''.
LOOP AT i_acthelp.
SELECT SINGLE mntxt FROM t529t INTO i_acthelp-mntxt
WHERE sprsl ='EN' AND
massn = i_acthelp-massn.
MODIFY i_acthelp.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
RETFIELD = 'MASSN'
* PVALKEY = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = ' '
* STEPL = 0
WINDOW_TITLE = 'Action Type'
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* CALLBACK_METHOD =
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = i_acthelp
* FIELD_TAB =
RETURN_TAB = it_return
* DYNPFLD_MAPPING =
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
READ TABLE it_return INTO wa_return INDEX 1.
S_ACTYPE = wa_return-fieldval.
There are 8 bits in a byte. There is No Shortcut to be A Great ABAP Programmer and It's Applies to All.
Sunday, June 12, 2011
Saturday, June 4, 2011
ABAP to Excel - with formula
If you guys looking for exporting your data into excel. Please consider this abap2xlsx .
Its based on XML technologies.
Checkout the details after the next link leap below
http://www.plinky.it/blog/2010/07/12/abap2xlsx-%E2%80%93-generate-your-professional-excel-spreadsheet-from-abap/#axzz1OArZdRLC
https://cw.sdn.sap.com/cw/groups/abap2xlsx
New Link :
http://wiki.scn.sap.com/wiki/display/ABAP/Excel+with+SAP+-+An+overview
Its based on XML technologies.
Checkout the details after the next link leap below
http://www.plinky.it/blog/2010/07/12/abap2xlsx-%E2%80%93-generate-your-professional-excel-spreadsheet-from-abap/#axzz1OArZdRLC
https://cw.sdn.sap.com/cw/groups/abap2xlsx
New Link :
http://wiki.scn.sap.com/wiki/display/ABAP/Excel+with+SAP+-+An+overview
ALV Grid - Fieldcatalog
Quick Tips
Please ensure you write capital letter for the fieldcatalog fieldname.
add 1 to l_count.
it_fieldcat-col_pos = l_count.
it_fieldcat-fieldname = 'NOSPOUSE'.
it_fieldcat-seltext_m = 'No of Spouse'.
* it_fieldcat-do_sum = 'X'.
append it_fieldcat.
clear it_fieldcat.
Please ensure you write capital letter for the fieldcatalog fieldname.
add 1 to l_count.
it_fieldcat-col_pos = l_count.
it_fieldcat-fieldname = 'NOSPOUSE'.
it_fieldcat-seltext_m = 'No of Spouse'.
* it_fieldcat-do_sum = 'X'.
append it_fieldcat.
clear it_fieldcat.
Monday, April 18, 2011
Macro without Logical Database Declaration
HR ABAP
INFOTYPES: 0000. "+badli 20110415
DATA it_pa0000 LIKE P0000 OCCURS 0. "+badli 20110415
"Begin add by badli 20110415
" to check record already exist or not.
RP-READ-INFOTYPE w_pyh002h-pernr 0000 it_pa0000 w_pyh002h-zactdat
'99991231' .
"Begin add by badli 20110415
" to check record already exist or not.
RP-READ-INFOTYPE w_pyh002h-pernr 0000 it_pa0000 w_pyh002h-zactdat
'99991231' .
Above record is used Macro RP-READ-INFOTYPE
Thursday, April 7, 2011
PERFORM dynpro format
Using BDC for HR.
Code Snippet
PERFORM dynpro USING 'X' 'SAPMP50A' '1000'.
FORM dynpro USING pa_dynbegin
pa_name
pa_value.
IF pa_dynbegin = 'X'.
CLEAR ta_bdcdata.
MOVE: pa_name TO ta_bdcdata-program,
pa_value TO ta_bdcdata-dynpro,
'X' TO ta_bdcdata-dynbegin.
APPEND ta_bdcdata.
ELSE.
CLEAR ta_bdcdata.
MOVE: pa_name TO ta_bdcdata-fnam,
pa_value TO ta_bdcdata-fval.
* CONDENSE ta_bdcdata-fval no-gaps.
APPEND ta_bdcdata.
ENDIF.
ENDFORM.
pa_name
pa_value.
IF pa_dynbegin = 'X'.
CLEAR ta_bdcdata.
MOVE: pa_name TO ta_bdcdata-program,
pa_value TO ta_bdcdata-dynpro,
'X' TO ta_bdcdata-dynbegin.
APPEND ta_bdcdata.
ELSE.
CLEAR ta_bdcdata.
MOVE: pa_name TO ta_bdcdata-fnam,
pa_value TO ta_bdcdata-fval.
* CONDENSE ta_bdcdata-fval no-gaps.
APPEND ta_bdcdata.
ENDIF.
ENDFORM.
Thursday, February 10, 2011
Difference Between Smart Forms and SAPscripts
The advantages of SAP Smart Forms as compared to SAPscript are:
- Minimum time required for form customizing
- Consistent use of graphical tools
- Separation of data retrieval and form logic
- No special scripting language
- Integration in Internet applications
- Migration of SAPscript forms and styles is supported
- SAPscript texts can be inserted into SAP Smart Forms
Tuesday, February 8, 2011
BDC Message Type Error
I suggest that you press F1 on MESSAGE. Btw, you already covered most of the message types.
To help you out a bit:
A(bort)
E(rror)
W(arning)
S(tatus)
I(nfo)
(e)X(it) (guess the E was already taken)
Indeed, MESSTAB is filled in the same order as a user would see them.
Since this is a BDC program I asume there is no user present to read your messages. Neither does he have the means to influence the program. So I guess you want to write the messages to a log. And I think you want to have plian text, not something like E123(AB). Fortunately SAP has provided us with some useful function modules like BAPI_MESSAGE_GET_DETAIL (set textformat to 'NON')
But there are tons of FM's that deal with messages. Also take a look at table T100; that is where all messages are stored.
If you want to write your messages to an application log, take a look at function group SLG0
To help you out a bit:
A(bort)
E(rror)
W(arning)
S(tatus)
I(nfo)
(e)X(it) (guess the E was already taken)
Indeed, MESSTAB is filled in the same order as a user would see them.
Since this is a BDC program I asume there is no user present to read your messages. Neither does he have the means to influence the program. So I guess you want to write the messages to a log. And I think you want to have plian text, not something like E123(AB). Fortunately SAP has provided us with some useful function modules like BAPI_MESSAGE_GET_DETAIL (set textformat to 'NON')
But there are tons of FM's that deal with messages. Also take a look at table T100; that is where all messages are stored.
If you want to write your messages to an application log, take a look at function group SLG0
source :
Subscribe to:
Posts (Atom)