Table internal in a module function
Hi abappers,
I want use the values of my table internal in my function module; then in my module funtion add the table internal in the tab TABLE
Then call to my function module:
num = 3.
CALL FUNCTION 'ZMF1'
EXPORTING
NOM_TABLA = 'YXS2'
NUM = num
TABLES
I_TABLA = I_YXS2.
but when I want obtain in my function module the values of the table internal, it is emplty.
Can you help me, please?
Cordial greetings.
Hi Adytya,
yes I want take values from program and then later use it in my function module.
In the program the values of the table internal are correct, but when I want use it in my function module, the table internal is empty and I need modify the value of the table
CODE OF MY PROGRAM:
DATA: BEGIN OF I_YXS2 OCCURS 0.
INCLUDE STRUCTURE YXS2.
DATA: END OF I_YXS2.
CALL FUNCTION 'ZMF1'
EXPORTING
NOM_TABLA = 'YXS2'
TABLES
I_TABLA = I_YXS2
CODE OF MY FUNCTION MODULE:
TABLES: YXS2.
LOOP AT I_YXS2.
MOVE-CORRESPONDING I_YXS2 TO YXS2.
MODIFY YXS2.
* commit work and wait.
ENDLOOP.
Thank you for your attention.
Cordial greetings.
Similar Messages
-
How to Send Internal table to SAP Spool using Function Modules or Methods?
Hi Experts,
How to Send Internal table to SAP Spool using Function Modules or Methods?
Thanks ,
KiranThis is my code.
I still get the no ABAP list data for the spool, even tho I can see it sp01?
REPORT Z_MAIL_PAYSLIP.
* Declaration Part *
tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
infotypes: 0000, 0001, 0105, 0655.
data: begin of ITAB occurs 0,
MTEXT(25) type C,
PERNR like PA0001-PERNR,
ABKRS like PA0001-ABKRS,
ENAME like PA0001-ENAME,
USRID_LONG like PA0105-USRID_LONG,
end of ITAB.
data: W_BEGDA like HRPY_RGDIR-FPBEG,
W_ENDDA like HRPY_RGDIR-FPEND.
data: RETURN like BAPIRETURN1 occurs 0 with header line.
data: P_INFO like PC407,
P_FORM like PC408 occurs 0 with header line.
data: P_IDX type I,
MY_MONTH type T549Q-PABRP,
STR_MY_MONTH(2) type C,
MY_YEAR type T549Q-PABRJ,
STR_MY_YEAR(4) type C,
CRLF(2) type x value '0D0A'.
data: W_CMONTH(10) type C.
data: TAB_LINES type I,
ATT_TYPE like SOODK-OBJTP.
data: begin of P_INDEX occurs 0,
INDEX type I,
end of P_INDEX.
constants: begin of F__LTYPE, "type of line
CMD like PC408-LTYPE value '/:', "command
TXT like PC408-LTYPE value 's', "textline
end of F__LTYPE.
constants: begin of F__CMD, "commands
NEWPAGE like PC408-LINDA value '',
end of F__CMD.
data: P_LIST like ABAPLIST occurs 1 with header line.
*data: OBJBIN like SOLISTI1 occurs 10 with header line,
data: OBJBIN like LVC_S_1022 occurs 10 with header line,
DOCDATA like SODOCCHGI1,
OBJTXT like SOLISTI1 occurs 10 with header line,
OBJPACK like SOPCKLSTI1 occurs 1 with header line,
RECLIST like SOMLRECI1 occurs 1 with header line,
OBJHEAD like SOLISTI1 occurs 1 with header line,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_buffer type string,
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname.
data: file_length type int4,
spool_id type rspoid,
line_cnt type i.
*-------------------------------------------------------------------* * INITIALIZATION *
OBJBIN = ' | '.
append OBJBIN.
OBJPACK-HEAD_START = 1.
data: S_ABKRS like PV000-ABKRS.
data: S_PABRP like T549Q-PABRP.
data: S_PABRJ like T549Q-PABRJ.
* SELECTION SCREEN *
selection-screen begin of block BL1.
parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
selection-screen end of block BL1.
START-OF-SELECTION.
s_ABKRS = PNPXABKR.
S_PABRP = PNPPABRP.
s_pabrj = PNPPABRJ.
w_begda = PN-BEGDA.
w_endda = PN-ENDDA.
get pernr.
* "Check active employees
rp-provide-from-last p0000 space pn-begda pn-endda.
CHECK P0000-STAT2 IN PNPSTAT2.
* "Check Payslip Mail flag
rp-provide-from-last p0655 space pn-begda pn-endda.
CHECK P0655-ESSONLY = 'X'.
rp-provide-from-last p0001 space pn-begda pn-endda.
* "Find email address
RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
if p0105-usrid_LONG ne ''.
ITAB-PERNR = P0001-PERNR.
ITAB-ABKRS = P0001-ABKRS.
ITAB-ENAME = P0001-ENAME.
ITAB-USRID_LONG = P0105-USRID_LONG.
append itab.
clear itab.
endif.
"SY-UCOMM ='ONLI'
END-OF-SELECTION.
*------------------------------------------------------------------* start-of-selection.
write : / 'Payroll Area : ', S_ABKRS.
write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
write : / 'System Time : ', SY-UZEIT.
write : / 'User Name : ', SY-UNAME.
write : / SY-ULINE.
sort ITAB by PERNR.
loop at ITAB.
clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
* Retrieve Payroll results sequence number for this run
select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
and FPBEG ge W_BEGDA
and FPEND le W_ENDDA
and SRTZA eq 'A'.
* Produce payslip for those payroll results
if SY-SUBRC = 0.
call function 'GET_PAYSLIP'
EXPORTING
EMPLOYEE_NUMBER = ITAB-PERNR
SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
PAYSLIP_VARIANT = PAY_VAR
IMPORTING
RETURN = RETURN
P_INFO = P_INFO
TABLES
P_FORM = P_FORM.
check RETURN is initial.
* remove linetype from generated payslip
loop at p_form.
objbin = p_form-linda.
append objbin.
line_cnt = line_cnt + 1.
endloop.
file_length = line_cnt * 1022.
* create spool file of paylsip
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = file_length
IMPORTING
e_spoolid = spool_id
TABLES
it_textdata = objbin.
IF sy-subrc EQ 0.
WRITE spool_id.
ENDIF.
DESCRIBE table objbin.
DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = spool_id
NO_DIALOG = ' '
DST_DEVICE = 'MAIL'
* PDF_DESTINATION =
* IMPORTING
* PDF_BYTECOUNT = l_no_of_bytes
* PDF_SPOOLID = l_pdf_spoolid
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
TABLES
PDF = pdf
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Download PDF file C Drive
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\itab_to_pdf.pdf'
filetype = 'BIN'
TABLES
data_tab = pdf.
* Transfer the 132-long strings to 255-long strings
* LOOP AT pdf.
* TRANSLATE pdf USING ' ~'.
* CONCATENATE gd_buffer pdf INTO gd_buffer.
* ENDLOOP.
* TRANSLATE gd_buffer USING '~ '.
* DO.
* it_mess_att = gd_buffer.
* APPEND it_mess_att.
* SHIFT gd_buffer LEFT BY 255 PLACES.
* IF gd_buffer IS INITIAL.
* EXIT.
* ENDIF.
* ENDDO.
OBJHEAD = 'Objhead'.
append OBJHEAD.
* preparing email subject
concatenate W_ENDDA(6)
' Payslip-'
ITAB-ENAME+0(28)
ITAB-PERNR+4(4) ')'
into DOCDATA-OBJ_DESCR.
DOCDATA-OBJ_NAME = 'Pay Slip'.
DOCDATA-OBJ_LANGU = SY-LANGU.
OBJTXT = 'Pay Slip.'.
append OBJTXT.
*prepare email lines
OBJTXT = DOCDATA-OBJ_DESCR.
append OBJTXT.
OBJTXT = 'Please find enclosed your current payslip.'.
append OBJTXT.
* Write Attachment(Main)
* 3 has been fixed because OBJTXT has fix three lines
read table OBJTXT index 3.
* DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
clear OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = 3.
OBJPACK-DOC_TYPE = 'RAW'.
append OBJPACK.
* Create Message Attachment
ATT_TYPE = 'PDF'.
describe table OBJBIN lines TAB_LINES.
read table OBJBIN index TAB_LINES.
* OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = ATT_TYPE.
OBJPACK-OBJ_NAME = 'ATTACHMENT'.
OBJPACK-OBJ_DESCR = 'Payslip'.
append OBJPACK.
* Create receiver list refresh RECLIST.
clear RECLIST.
RECLIST-RECEIVER = itab-USRID_long.
translate RECLIST-RECEIVER to lower case.
RECLIST-REC_TYPE = 'U'.
append RECLIST.
* Send the document
*SO_NEW_DOCUMENT_ATT_SEND_API1
call function 'SO_DOCUMENT_SEND_API1'
exporting
DOCUMENT_DATA = DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
tables
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = pdf
CONTENTS_TXT = OBJTXT
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
RECEIVERS = RECLIST
exceptions
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
others = 8.
if SY-SUBRC NE 0.
ITAB-MTEXT = 'Message Not Sent to : '.
else.
ITAB-MTEXT = 'Message Sent to : '.
endif.
* else.
* ITAB-MTEXT = 'Message Not Sent to : '.
* endif.
else.
"SY-SUBRC Not = 0
ITAB-MTEXT = 'Payroll data not found : '.
endif.
"end of SY-SUBRC = 0.
modify ITAB.
endloop. "end loop at ITAB
sort ITAB by MTEXT PERNR.
loop at ITAB.
at new MTEXT.
uline.
write : / ITAB-MTEXT color 4 intensified on.
write : / 'Emp. Code' color 2 intensified on,
12 'Emp. Name' color 2 intensified on,
54 'Email ID' color 2 intensified on.
endat.
write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
endloop. -
Accessing internal table of main program inside function module...
I have function module say ZFUNC and main program say ZMAIN and internal table defined as IT_TAB inside ZMAIN but not passed as parameter to Function module ZFUNC.
If I want to access the field value of IT_TAB of main program ZMAIN inside ZFUNC during debugging then, I simply put <b>(ZMAIN)IT_TAB-amount</b> in ABAP debugger and then change it when the debugger is inside ZFUNC.
How can I write code to change the value of internal table of main program in function module ZFUNC instead of doing in debugger ? I guess I have to use some field symbols, but not sure. Please suggest.
Regards,
Rajesh.Yes, you do need to use a field symbol. Say for example, you had a internal table called IMARC in your program and you want to access it later in a funciton module, you would do something like this.
data: xmarc type marc.
field-symbols: <imarc> type marc_upl_tt.
* Assign an internal table
field = '(ZPROGRAM_NAME)IMARC[]'.
assign (field) to <imarc>.
loop at <imarc> into xmarc.
write: / xmarc-matnr, xmarc-werks.
endloop.
Regards,
Rich Heilman -
New in NW04s: FL069 TABLES parameters are obsolete (in function modules)
Can somebody explain what is the fundamental reason for this behaviour in NW04s?
In Netweaver 2004s system (like ERP2005 ) you get a warning message in SE37:
FL069 TABLES parameters are obsolete! when defining quite ordinary tables parameter using LIKE and reference to a structure in ddic.
I now speak normal function modules, not RFC enabled.
This example of tables parameter definition will cause the warning message:
return LIKE BAPIRET2
I of course looked the additional help provided by this message FL069. I understood it as following:
you should stop using TABLES parameter and more often use CHANGING parameter by referring a TABLE TYPE defined in dictionary.
if using CHANGING parameter and still want to pass the header line of your internal table you should use a separate parameter (EXPORT or CHANGING parameter)
Developers have too much used TABLES parameters for passing internal tables for reading (by value) rather than to be modified (by reference). As a consequence, fm could have change the header line without caller to know it.
in my opinion the message help is missleadingly telling that header line is no longer passed to function module if TABLES parameter is used. I made a small test program and fm (with TABLES paramerer), and everything worked as before.
The warning message can be ignored by pressing Enter a few times and your fm with TABLES parameter works as it had in older versions of Netweaver.
SAP is still using a lot of TABLES parameters in their own function modules. For example SD_SALES_HEADER_MAINTAIN.
So what is the point of this warning message while everything still works as it used to be and SAP uses this same "OBSOLETE" feature itself? Is there anything more fundamental behind this message? Like TABLES paremeters will no longer work in future versions of ABAP (or header line passing will be ignored in future versions) and therefore developers should switch to CHANGING/EXPORT parameters with TABLE TYPES as soon as possible??
Please understand that I don't need any assistance how to avoid this message, just interested to share your opinions what is the purpose of this warning message.
That is why I did not marked this thread as a question.
Br: KimmoHello,
This is the view under Tables tab in my function builder:
I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT
I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS
E_T_DATA LIKE SFLIGHT (which I change to YBWxxxx)
The moment I change to YBWxxxxx it gives me that error '"TABLES parameters are obsolete! "'
and unfortunately hitting enter several times is not helping either
Thanks! -
How to get data from table to pass into alvgrid function module
i want to get some data from below table to pass into function module of alvgrid
how can i get data please help.
thanks in advanced.
form get_data.
select * into corresponding fields of table itab
from J_1IEXCHDR
inner join J_1IEXCDTL
on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
where J_1IEXCHDr~status = 'P'.
append itab.
endform.Pass your final table(internal table which you want to display) along with fieldcatalog to FM reuse_alv_grid_display.:\
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = i_repid
IT_SORT = gt_sort
it_fieldcat = lt_fieldcat[]
TABLES
t_outtab = lt_final
EXCEPTIONS
program_error = 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. -
How to add internal table fileds in Text module in smart forms
Hi Friends,
How to add internal table fileds in Text module in smart forms?
Thanks & Regards,
Vallamuthu.MHi Vallamuthu ,
how did you solve your problem?
thanks, -
Table to find out the function modules used in a particular program
Hi,
Is there any standard table to find out the function modules used in a particular program?
Such as there is a table D010TAB to find out the tables used in a program .Hello
There is no exist such table.
But try this snippet:
REPORT ZSEARCH.
PARAMETERS: P_NAME LIKE D010SINF-PROG.
DATA: PROGTXT(72) TYPE C OCCURS 0 WITH HEADER LINE.
DATA: TMP(72) TYPE C OCCURS 0 WITH HEADER LINE.
DATA: FUNCT TYPE RS38L_FNAM OCCURS 0 WITH HEADER LINE.
DATA: INCL TYPE RSEUINC OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_GET_ALL_INCLUDES'
EXPORTING PROGRAM = P_NAME
TABLES INCLUDETAB = INCL.
LOOP AT INCL.
READ REPORT INCL-MASTER INTO TMP.
APPEND LINES OF TMP TO PROGTXT.
REFRESH TMP.
ENDLOOP.
READ REPORT P_NAME INTO TMP.
APPEND LINES OF TMP TO PROGTXT.
LOOP AT PROGTXT.
IF PROGTXT CS 'CALL FUNCTION'.
SEARCH PROGTXT FOR ''''.
IF SY-SUBRC = 0.
DO.
SHIFT PROGTXT LEFT BY 1 PLACES.
IF PROGTXT(1) = ''''.
SHIFT PROGTXT LEFT BY 1 PLACES.
DO.
SHIFT PROGTXT RIGHT BY 1 PLACES.
IF PROGTXT+71(1) = ''''.
SHIFT PROGTXT RIGHT BY 1 PLACES.
CONDENSE PROGTXT.
FUNCT = PROGTXT. COLLECT FUNCT. EXIT.
ENDIF.
ENDDO.
EXIT.
ENDIF.
ENDDO.
ENDIF.
ENDIF.
ENDLOOP.
SORT FUNCT.
LOOP AT FUNCT.
WRITE: FUNCT. NEW-LINE.
ENDLOOP. -
Table maintenance by using module pool program
Hi
Please give me step by step procedure to generate table maintenance by using module pool programWhile creating table maintenance, you can go thro' the module pool program used for that.In that,in PBO part,just try making particular field active = 1 inside loop at screen.
Girish Kumar Lo...
Posts: 1,518
Questions: 2
Registered: 4/19/07
Forum points: 1,982
Re: Regarding Table maintanence generator
Posted: Jun 26, 2007 9:02 AM in response to: Younus Khan Reply E-mail this post
here is the code for that
REPORT ZTAB_MAINT
NO STANDARD PAGE HEADING
MESSAGE-ID ZZ.
T Y P E D E C L A R A T I O N S
*--Types declaration for selection to be passed as parameter into
*--VIEW_MAINTENANCE_CALL FM
TYPES: BEGIN OF TP_RANGETAB.
INCLUDE STRUCTURE VIMSELLIST.
TYPES: END OF TP_RANGETAB.
D A T A D E C L A R A T I O N S
DATA: V_MATNR TYPE MATNR, " Material Number
V_WERKS TYPE WERKS_D, " Plant
V_KONOB TYPE KONOB, " Product allocation object
V_ZCPLT(40) TYPE C. " Message
I N T E R N A L T A B L E D E C L A R A T I O N S
Internal table to subroutine code
*Internal table used as selection for VIEW_MAINTENANCE_CALL FM
DATA: IT_RANGETAB TYPE STANDARD TABLE OF TP_RANGETAB WITH HEADER LINE.
*--Internal table used for getting the tablefields
DATA: BEGIN OF IT_HEADER OCCURS 1.
INCLUDE STRUCTURE VIMDESC.
DATA: END OF IT_HEADER.
*--Name Tabel
DATA: BEGIN OF IT_NAMTAB OCCURS 50.
INCLUDE STRUCTURE VIMNAMTAB.
DATA: END OF IT_NAMTAB.
*--Used for handling 'BT' option
DATA: BEGIN OF IT_MATNR OCCURS 0,
MATNR TYPE MATNR,
END OF IT_MATNR.
*--Used for handling 'BT' option
DATA: BEGIN OF IT_WERKS OCCURS 0,
WERKS TYPE WERKS,
END OF IT_WERKS.
*--Used for handling 'BT' option
DATA: BEGIN OF IT_KONOB OCCURS 0,
KONOB TYPE KONOB,
END OF IT_KONOB.
*--Used for handling 'BT' option
DATA: BEGIN OF IT_ZCPLT OCCURS 0,
ZCPLT(40) TYPE C,
END OF IT_ZCPLT.
I N P U T S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK SELSCR WITH FRAME TITLE TEXT-001.
RANGES: R_MATNR FOR V_MATNR.
RANGES: R_WERKS FOR V_WERKS.
RANGES: R_KONOB FOR V_KONOB.
RANGES: R_ZCPLT FOR V_ZCPLT.
Select Options
SELECT-OPTIONS: S_MATNR FOR V_MATNR NO-EXTENSION, " Material
S_WERKS FOR V_WERKS NO-EXTENSION, " Plant
S_KONOB FOR V_KONOB NO-EXTENSION,
" Product allocation object
S_ZCPLT FOR V_ZCPLT NO-EXTENSION. " Plant
SELECTION-SCREEN END OF BLOCK SELSCR.
A T S E L E C T I O N S C R E E N
AT SELECTION-SCREEN.
Validate user inputs
PERFORM FRM_VALIDATIONS.
S T A R T O F S E L E C T I O N
START-OF-SELECTION.
Fetch Data from Data Base
PERFORM FRM_GET_DATA.
S U B R O U T I N E S
*& Form frm_get_data
Call the function module VIEW_MAINTENNACE_CALL to get data
based on selection criteria
FORM FRM_GET_DATA .
CALL FUNCTION 'VIEW_GET_DDIC_INFO'
EXPORTING
VIEWNAME = 'ZTAB'
TABLES
X_HEADER = IT_HEADER
X_NAMTAB = IT_NAMTAB
SELLIST = IT_RANGETAB
EXCEPTIONS
NO_TVDIR_ENTRY = 1
TABLE_NOT_FOUND = 2.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'Error in ZTAB table'(005).
ENDIF.
CLEAR: IT_RANGETAB,
IT_RANGETAB[].
LOOP AT IT_NAMTAB.
CASE IT_NAMTAB-VIEWFIELD.
WHEN 'MATNR'.
CLEAR IT_RANGETAB.
IT_RANGETAB-VIEWFIELD = 'MATNR'.
IT_RANGETAB-TABIX = SY-TABIX.
IT_RANGETAB-DDIC = IT_NAMTAB-READONLY.
LOOP AT S_MATNR.
CASE S_MATNR-OPTION.
WHEN 'EQ'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'EQ'.
IT_RANGETAB-VALUE = S_MATNR-LOW.
APPEND IT_RANGETAB.
WHEN 'BT'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'GE'.
IT_RANGETAB-VALUE = S_MATNR-LOW.
APPEND IT_RANGETAB.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'LE'.
IT_RANGETAB-VALUE = S_MATNR-HIGH.
APPEND IT_RANGETAB.
WHEN 'NB'.
CLEAR: R_MATNR,
R_MATNR[].
R_MATNR-SIGN = 'I'.
R_MATNR-OPTION = 'BT'.
R_MATNR-LOW = S_MATNR-LOW.
R_MATNR-HIGH = S_MATNR-HIGH.
APPEND R_MATNR.
SELECT MATNR
INTO TABLE IT_MATNR
FROM ZTAB
WHERE MATNR IN R_MATNR.
DELETE ADJACENT DUPLICATES FROM IT_MATNR COMPARING MATNR
LOOP AT IT_MATNR.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = IT_MATNR-MATNR.
APPEND IT_RANGETAB.
ENDLOOP.
WHEN 'NE'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = S_MATNR-LOW.
APPEND IT_RANGETAB.
WHEN OTHERS.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = S_MATNR-OPTION.
IT_RANGETAB-VALUE = S_MATNR-LOW.
APPEND IT_RANGETAB.
ENDCASE.
ENDLOOP.
WHEN 'WERKS'.
CLEAR IT_RANGETAB.
IT_RANGETAB-VIEWFIELD = 'WERKS'.
IT_RANGETAB-TABIX = SY-TABIX.
IT_RANGETAB-DDIC = IT_NAMTAB-READONLY.
LOOP AT S_WERKS.
CASE S_WERKS-OPTION.
WHEN 'EQ'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'EQ'.
IT_RANGETAB-VALUE = S_WERKS-LOW.
APPEND IT_RANGETAB.
WHEN 'BT'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'GE'.
IT_RANGETAB-VALUE = S_WERKS-LOW.
APPEND IT_RANGETAB.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'LE'.
IT_RANGETAB-VALUE = S_WERKS-HIGH.
APPEND IT_RANGETAB.
WHEN 'NB'.
CLEAR: R_WERKS,
R_WERKS[].
R_WERKS-SIGN = 'I'.
R_WERKS-OPTION = 'BT'.
R_WERKS-LOW = S_WERKS-LOW.
R_WERKS-HIGH = S_WERKS-HIGH.
APPEND R_WERKS.
SELECT WERKS
INTO TABLE IT_WERKS
FROM MARC
WHERE WERKS IN R_WERKS.
DELETE ADJACENT DUPLICATES FROM IT_WERKS COMPARING WERKS
LOOP AT IT_WERKS.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = IT_WERKS-WERKS.
APPEND IT_RANGETAB.
ENDLOOP.
WHEN 'NE'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = S_WERKS-LOW.
APPEND IT_RANGETAB.
WHEN OTHERS.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = S_WERKS-OPTION.
IT_RANGETAB-VALUE = S_WERKS-LOW.
APPEND IT_RANGETAB.
ENDCASE.
ENDLOOP.
WHEN 'KONOB'.
CLEAR IT_RANGETAB.
IT_RANGETAB-VIEWFIELD = 'KONOB'.
IT_RANGETAB-TABIX = SY-TABIX.
IT_RANGETAB-DDIC = IT_NAMTAB-READONLY.
LOOP AT S_KONOB.
CASE S_KONOB-OPTION.
WHEN 'EQ'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'EQ'.
IT_RANGETAB-VALUE = S_KONOB-LOW.
APPEND IT_RANGETAB.
WHEN 'BT'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'GE'.
IT_RANGETAB-VALUE = S_KONOB-LOW.
APPEND IT_RANGETAB.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'LE'.
IT_RANGETAB-VALUE = S_KONOB-HIGH.
APPEND IT_RANGETAB.
WHEN 'NB'.
CLEAR: R_KONOB,
R_KONOB[].
R_KONOB-SIGN = 'I'.
R_KONOB-OPTION = 'BT'.
R_KONOB-LOW = S_KONOB-LOW.
R_KONOB-HIGH = S_KONOB-HIGH.
APPEND R_KONOB.
SELECT KONOB
INTO TABLE IT_KONOB
FROM T190
WHERE KONOB IN R_KONOB.
DELETE ADJACENT DUPLICATES FROM IT_KONOB COMPARING KONOB
LOOP AT IT_KONOB.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = IT_KONOB-KONOB.
APPEND IT_RANGETAB.
ENDLOOP.
WHEN 'NE'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = S_KONOB-LOW.
APPEND IT_RANGETAB.
WHEN OTHERS.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = S_KONOB-OPTION.
IT_RANGETAB-VALUE = S_KONOB-LOW.
APPEND IT_RANGETAB.
ENDCASE.
ENDLOOP.
WHEN 'ZCPLT'.
CLEAR IT_RANGETAB.
IT_RANGETAB-VIEWFIELD = 'ZCPLT'.
IT_RANGETAB-TABIX = SY-TABIX.
IT_RANGETAB-DDIC = IT_NAMTAB-READONLY.
LOOP AT S_ZCPLT.
CASE S_ZCPLT-OPTION.
WHEN 'EQ'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'EQ'.
IT_RANGETAB-VALUE = S_ZCPLT-LOW.
APPEND IT_RANGETAB.
WHEN 'BT'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'GE'.
IT_RANGETAB-VALUE = S_ZCPLT-LOW.
APPEND IT_RANGETAB.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'LE'.
IT_RANGETAB-VALUE = S_ZCPLT-HIGH.
APPEND IT_RANGETAB.
WHEN 'NB'.
CLEAR: R_ZCPLT,
R_ZCPLT[].
R_ZCPLT-SIGN = 'I'.
R_ZCPLT-OPTION = 'BT'.
R_ZCPLT-LOW = S_ZCPLT-LOW.
R_ZCPLT-HIGH = S_ZCPLT-HIGH.
APPEND R_ZCPLT.
SELECT ZCPLT
INTO TABLE IT_ZCPLT
FROM ZTAB
WHERE ZCPLT IN R_ZCPLT.
DELETE ADJACENT DUPLICATES FROM IT_ZCPLT COMPARING ZCPLT
LOOP AT IT_ZCPLT.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = IT_ZCPLT-ZCPLT.
APPEND IT_RANGETAB.
ENDLOOP.
WHEN 'NE'.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = 'NE'.
IT_RANGETAB-VALUE = S_ZCPLT-LOW.
APPEND IT_RANGETAB.
WHEN OTHERS.
IT_RANGETAB-AND_OR = 'AND'.
IT_RANGETAB-OPERATOR = S_ZCPLT-OPTION.
IT_RANGETAB-VALUE = S_ZCPLT-LOW.
APPEND IT_RANGETAB.
ENDCASE.
ENDLOOP.
ENDCASE.
ENDLOOP.
IF S_ZCPLT[] IS INITIAL.
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
ACTION = 'U'
VIEW_NAME = 'ZTAB'
TABLES
DBA_SELLIST = IT_RANGETAB
EXCEPTIONS
CLIENT_REFERENCE = 1
FOREIGN_LOCK = 2
INVALID_ACTION = 3
NO_CLIENTINDEPENDENT_AUTH = 4
NO_DATABASE_FUNCTION = 5
NO_EDITOR_FUNCTION = 6
NO_SHOW_AUTH = 7
NO_TVDIR_ENTRY = 8
NO_UPD_AUTH = 9
ONLY_SHOW_ALLOWED = 10
SYSTEM_FAILURE = 11
UNKNOWN_FIELD_IN_DBA_SELLIST = 12
VIEW_NOT_FOUND = 13
MAINTENANCE_PROHIBITED = 14
OTHERS = 15.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
ACTION = 'U'
VIEW_NAME = 'ZTAB_ZTEST'
TABLES
DBA_SELLIST = IT_RANGETAB
EXCEPTIONS
CLIENT_REFERENCE = 1
FOREIGN_LOCK = 2
INVALID_ACTION = 3
NO_CLIENTINDEPENDENT_AUTH = 4
NO_DATABASE_FUNCTION = 5
NO_EDITOR_FUNCTION = 6
NO_SHOW_AUTH = 7
NO_TVDIR_ENTRY = 8
NO_UPD_AUTH = 9
ONLY_SHOW_ALLOWED = 10
SYSTEM_FAILURE = 11
UNKNOWN_FIELD_IN_DBA_SELLIST = 12
VIEW_NOT_FOUND = 13
MAINTENANCE_PROHIBITED = 14
OTHERS = 15.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. " frm_get_data
*& Form frm_validations
Validating field values
FORM FRM_VALIDATIONS .
Material number should not be validated (10/17/2005)
CLEAR V_MATNR.
SELECT SINGLE MATNR
INTO V_MATNR
FROM MARA
WHERE MATNR IN S_MATNR.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'Material not found'.
ENDIF.
CLEAR V_WERKS.
SELECT SINGLE WERKS
INTO V_WERKS
FROM ZTAB
WHERE WERKS IN S_WERKS.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'Plant (WERKS) not found'(002).
ENDIF.
CLEAR V_KONOB.
SELECT SINGLE KONOB
INTO V_KONOB
FROM ZTAB
WHERE KONOB IN S_KONOB.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH ' Product allocation object not found'(003).
ENDIF.
CLEAR V_WERKS.
SELECT SINGLE WERKS
INTO V_WERKS
FROM ZTAB
WHERE WERKS IN S_ZCPLT.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'Plant (ZCPLT) not found'(004).
ENDIF.
ENDFORM. " frm_validations
reward points if it is usefull ...
Regarding Table maintanence generator -
Error while posting GR "Internal error in FORM/FUNCTION CKML_F_BUILD_INDEX
Dear Experts,
While posting GR for any non-valuated material, I am getting an error "Internal error in FORM/FUNCTION CKML_F_BUILD_INDEX in position 1 with RC 0
Message no. C+099"
Kindly explore the possibilities of solution for the above error. The abve error only showing at the time of posting and not whicle Check.
Regards,
TusharHi Tushar,
Your problem is happening because of the applicaiton of an SAP Note. I think PM has nothing to do with this Error. Pl. read the following (which I read this from one SAP website) & check the relevant SAP notes and take action or write to SAP for solution.
Symptom
The posting of goods receipts results in a long runtime.
Other terms
ACTUPD, MIGO, performance, material ledger
Reason and Prerequisites
The actual costing is active.
The performance problems usually occur when there are several procurement alternatives or procurement processes (tables CKMLMV001 and CKMLMV002) for certain materials.
This can be caused by implementing the modification according to Note 1017470 or 919869, [...]
Regards,
Bala. -
BAPI or Module Function to retrieve PO attachment
Hi,
i want to retrieve and display the PO attachment list and PO attachment . I can retrieve all PO Informations(PO Header, , Item ,...), via table EKKO and EKPO but i couldn't retrieve and display PO attachment.
The attachment is created via the ME22.
Thanxduplicate of
BAPI or Module Function to retrieve PO attachment -
Globale interface in module function
hi
please ,
I like to see in source code before importing parametrs the sentance " globale interface" in source code of Module function , instead of 'local interface'.
have you ever seen that?
like this.
FUNCTION Z_SPLIT_LONG_TEXT.
***""Globale interface:***
*" IMPORTING
*" VALUE(LIMIET) LIKE ZSPLIT-LIMIET
*" TABLES
*" TE_SPLITSEN STRUCTURE TLINE
*" GESPLITST STRUCTURE ZSPLITYes, of course. Most of you have used function modules, and know that alot of times, you will have separate includes for your FORM routines. Well, if the interface is local, then your FORM routines will not have access to these parameters, you would need to pass these parameters using FORM parameters. If you would set the parameters as global, then they are visible to any/all FORM routines that you declare within the function group. If you think about it, it really is not a good practice to globalize your parameters( good design calls for keeping things as local as possible ), which is why this feature has bee deemed obselete.
Regards,
Rich Heilman -
I need T.Codes and Tables in SAP-ICM module
I need T.Codes and Tables in SAP-ICM module
Thanks in Advance.Here are some of the source tables for the FI-CO extractors.
FI-CO T-Codes
FK10N - Vendor Balance Display (FI-AP)
FD10N - Customer Balance Display (FI-AR)
S_ALR_87013611 - Cost Centers: Actual/Plan/Variance (CCA)
2KEE - Profit Center: Totals Records (COPA)
FS10N - Balance Display (FI-GL)
KE5Z - Profit Center: Actual Line Items (PCA)
FI-CO Tables
BSEG - Accounting Document Segment
BSAK - Accounting: Secondary Index for Vendors (Cleared Items)
BSIK - Accounting: Secondary Index for Vendors
BSAD - Accounting: Secondary Index for Customers (Cleared Items)
BSID - Accounting: Secondary Index for Customers
GLPCA - EC-PCA: Actual Line Items
GLPCT - EC-PCA: Totals Table
CE1* - COPA Line Items (* is desination for Industry Solution)
CE4* - COPA Totals
COSP - CO Object: Cost Totals for External Postings
COSS - CO Object: Cost Totals for Internal Postings -
Error while Importing a Table in To Target Module
Hi All,
Iam getting follwong error msg while importing a table in OWB Target Module.
API4806: Object description is not allowed to be translated before object business name. Please give a translation to the business name first.
why I am getting this error ?
RajeshGuys,
I am able to solve the problem. I think the problem is Language settings difference between Database and OWB repository. -
Would clicking the load button while NSS Internal PKSS #11 Module is selected and accepting the pop-up window without filling in any more information create a problem for the Firefox 8 program?
Quote from: lcwhitlock on 04-April-14, 13:44:09
Hello darkhawk,
Thank you for the recommendation. I somewhat understand what a MS DOS disk is, but I'm not sure how to go about creating one. I've seen where you can use a program, like Rufus, to create a usb one - but I'm leery about using 3rd-party programs (especially ones I'm not familiar with). I've come across a couple of 'how-to' tuts, but they didn't clarify what files (if any) I would need to include on the disk (for my particular situation). Right now I don't have any blank cds, nor any extra flash/thumb drives - wish I did, but hadn't needed these for years. There has only been one other time where I needed to re-install Windows, but that was over 15 years ago - I did it through BIOS, reformatting my drives, and then reinstalled via the Windows XP disk. Windows 8 is an entirely different breed, which has left me feeling a bit stumped, at times. If there was a way I could perform it (successfully), similar to the first time I did it years ago, I'd give it a try - but at the same time, I'm a bit reluctant, because if it doesn't work, then I'm stuck without any internet access to get further help.
Ask and ye shall receive. This should be doable in Windows 7 and Windows 8 on another PC. I recommend using a USB Flash drive like in this tutorial, but I'm sure you could use something else.
If you want, you could also use Hiren's BootCD to make a bootable CD with many options and programs on it (I keep one, just for certain situations) that will allow you to do the same things.
http://www.hiren.info/pages/bootcd
Also very useful for sorting out virus's as long as it's downloaded and made on another PC that is virus free...... -
How to put scrol bar in table viw control in module pool programming
how to put scrool bar in table-view control in module pool programming
Hi Rani,
You need not insert Scrollbar in the table control, it appears automcatically once the amount of data vertical or horizontal limit of table control.
Regards,
Sathish
Note : Reward useful Answers
Maybe you are looking for
-
Catch up depreciation from past period for PPA write-up
Hi, What is the best practice or solution to catch up depreciation from past period for the PPA (purchase price accounting) write-up? We need to write up assets for 2/28/2014 now (August). Once the assets are written up and when the depreciation runs
-
BlackBerry Messenger is not working with the WiFi
Hi, I'm living in France and i'm now in an other country for holidays and i would like to connect to BBM with just the WiFi but my WiFi logo is in grey so i can go on internet but not on BBM . I've call my operator and they told me that there were a
-
Why does acrobat X sometimes miss out elements when I print from a word 2010 document. I have just printed a document for a client and there are whole text boxes missing from the pdf file. Anyone else have this experience? How do I get it to print
-
How do you port forward with linksys routers?
It's all in the title.Message Edited by NaturalViolence on 10-19-200606:14 PM
-
Im trying to write a VI to write some data to a TDMS file, and this is my first time using the TDMS commands. I have the "Open Storage", "Write" and "Close Storage" commands all wired up, but my VI never runs because the "Open Storage" express VI com