EH&S: Safety Measures' Description in work Area. (CBIH02)
Hi Friends.
I have a question in this transaction: cbih02 , dympro safety measures:
I would like to know how could i make that the field Description (CCIHS_ACHIOT-ACDESCR) works with a Phrase catalog?
This it's because we are using phrase catalog of safety measures.
Thanks in advance,
Albio Vivas.-
Hi,
May this link helps u
http://help.sap.com/erp2005_ehp_03/helpdata/EN/90/475a82fb3f11d4b6850004ac160be0/frameset.htm
Ramesh
Similar Messages
-
Hello all,
I am trying to print the text that describes a safety measure on a smartform. (Transaction CBIH03 Display work areas -> Safety Measures -> Description).
The problem is that, if the text is long it is always displayed cut. I don't really know why but I think that this is related to the text type used in the smartform (in this case, Text Element).
I have changed the text type to "Include Text" but when I look for the text name on the header of the safety measure description what I find is "CCIHT_ACH0000000000000000000000000000000000000000".
Here come my two questions :o)
- Does anyone know how can I find the real name of that text?
- No matter how long the text is, is there a way to display the whole description of the safety measure?
Thank you in advance,
BeléHello Belén,
In table CCIHT_ACH for the field ACDESCR, you will find the text of the Safety measure.
The long text if maintained for the Safety measure can be found in field: ACDESCRFLG in the same table.
Regards,
Niraj -
Link Safety measure with agent for a Work Area
Hi,
Is there any way to match a specific safet measure to a specific Agent for a given Work Area?
For example, for a Work Area, I may have "dust" as an agent and i may need to link it with a specific safety measure oriented to people called "EPI Employee's training".
Thanks in advance,
Daniel SiñaniHi Daniel,
For you to be able to define safety measure for any hazard inducing agent, logically you must have done the study of the risks posed by that agent. This study is called as risk assessment in SAP EH&S. So, you will have to create risk assessment for "dust". Here you may assign safety measure "EPI Employee's training" under category "Organizational" and type "Education and training". Moreover, you can define many more fields for tracking of the safety measure to its successful completion.
Also, you can create SAP standard reports for Agents vs. Safety measures from following path:
IHS>Reporting>Risk Assessment-->List Agents & Safety measures for a work area, and List Agents & Safety measures for a person.
Regards,
Pavan -
Work Area Description Functions
Hello all,
I would like to know if there is a function to modify the description text of a work area. Transaction CBIH02 -> Go to -> Description.
Thank you in advance,
BeléHi Belén,
Double click the description field followed by entering the language required in the description menu could resolve the issue. Read SAP help/ following link -
http://help.sap.com/erp2005_ehp_04/helpdata/EN/11/6f8127e80c11d2b4830004ac160be0/frameset.htm
However, long text can be edited by long text editor only, if u r entering long text, then ensure that the push button is displayed at the entry line. Try it, will be helpful.
thanks & regards,
mahesh
Edited by: mahesh vr on Jun 24, 2010 3:11 PM -
Problem in modifying the code using work area concept
Hi,
I am working on a code in which i am on the code in which i am using the modify statement but it is not giving the right output.
here's d code:-
LOOP AT T_ITPO5 INTO W_ITPO5.
LOOP AT T_ITPO4 INTO W_ITPO4 WHERE AUFNR = W_ITPO5-AUFNR.
LOOP AT T_ITPO4 INTO W_ITPO4 FROM WV_INDEX.
IF W_ITPO4-AUFNR EQ W_ITPO5-AUFNR.
IF ITPO4-NTGEW <> 0 .
CALL FUNCTION 'ZGET_ITEM_WEIGHT'
EXPORTING
P_BUID = W_ITPO4-WERKS
P_ITEMID = W_ITPO4-MATNR
P_QTY = 1
P_UOM = W_ITPO4-MEINS
P_UOM1 = 'KG'
IMPORTING
P_RETVAL = W_ITPO4-WTKG.
TOTWT1 = W_ITPO4-WTKG * W_ITPO4-MENGE.
IF W_ITPO4-BWART = '261'.
W_ITPO5-I_QTY = W_ITPO5-I_QTY + TOTWT1.
ELSEIF W_ITPO4-BWART = '101' OR W_ITPO4-BWART = '531'.
W_ITPO5-I_QTY = W_ITPO5-I_QTY - TOTWT1.
ENDIF.
ENDLOOP.
MODIFY T_ITPO5 INDEX SY-TABIX FROM W_ITPO5.
MODIFY T_ITPO5 FROM W_ITPO5 TRANSPORTING AUFNR.
ENDLOOP.
WRITE: / 'PRD.NO ITEM DESCRIPTION WIP(KGS)'.
ULINE.
LOOP AT T_ITPO5 INTO W_ITPO5.
READ TABLE T_ITPO1 INTO W_ITPO1 WITH KEY AUFNR = W_ITPO5-AUFNR.
SELECT SINGLE MAKTG FROM MAKT INTO W_ITPO5-ITEMDESC WHERE MATNR = W_ITPO1-MATNR.
if sy-subrc = 0 .
WRITE: / W_ITPO5-AUFNR,W_ITPO5-ITEMDESC,W_ITPO5-I_QTY.
TOT_QTY = TOT_QTY + W_ITPO5-I_QTY.
else.
write 'Unsuccessful'.
endif.
ENDLOOP.
ULINE.
FORMAT COLOR 3.
WRITE: / 'GTOTAL',55 TOT_QTY.
FORMAT COLOR OFF.
plzz provide me guidelines to solve this problem.here's d code;-
TYPES: BEGIN OF ITPO1,
AUFNR TYPE AFPO-AUFNR, "Order Number
PSMNG TYPE AFPO-PSMNG, "Order item quantity
WEMNG TYPE AFPO-WEMNG, "Quantity of goods received for the order item
DWERK TYPE AFPO-DWERK, "Plant
MATNR LIKE AFPO-MATNR, "Item Id
END OF ITPO1.
DECLARATION FOR AUFM TABLE
TYPES: BEGIN OF ITPO4,
AUFNR TYPE AUFM-AUFNR, "Order Number
BWART TYPE AUFM-BWART, "Movement Type (Inventory Management)
MENGE TYPE AUFM-MENGE, "Quantity
MEINS TYPE AUFM-MEINS, "Base Unit of Measure
BLDAT TYPE AUFM-BLDAT, "Document Date in Document
WERKS TYPE AUFM-WERKS, "Plant
MATNR TYPE AUFM-MATNR, "Material Number
NTGEW TYPE MARA-NTGEW, "Net Weight
WTKG TYPE MARA-NTGEW,
END OF ITPO4,
BEGIN OF ITPO5 ,
AUFNR TYPE AUFM-AUFNR,
MENGE TYPE AUFM-MENGE,
I_QTY TYPE AUFM-MENGE,
ITEMDESC LIKE MAKT-MAKTG,
END OF ITPO5.
WORK AREA AND INTERNAL TABLE DECLARATION
DATA : W_ITPO1 TYPE ITPO1,
W_ITPO4 TYPE ITPO4,
W_ITPO5 TYPE ITPO5,
T_ITPO1 TYPE ITPO1 OCCURS 0,
T_ITPO4 TYPE ITPO4 OCCURS 0,
T_ITPO5 TYPE ITPO5 OCCURS 0.
VARIABLES
DATA: TOTWT1 LIKE AUFM-MENGE,
TOT_QTY LIKE AUFM-MENGE.
PARAMETERS N SELECT-OPTIONS
PARAMETERS: PLANT LIKE AFPO-DWERK.
SELECT-OPTIONS: PO_DATE FOR AFKO-GSTRP.
LOOP AT T_ITPO5 INTO W_ITPO5.
LOOP AT T_ITPO4 INTO W_ITPO4 WHERE AUFNR = W_ITPO5-AUFNR.
CALL FUNCTION 'ZGET_ITEM_WEIGHT'
EXPORTING
P_BUID = W_ITPO4-WERKS
P_ITEMID = W_ITPO4-MATNR
P_QTY = 1
P_UOM = W_ITPO4-MEINS
P_UOM1 = 'KG'
IMPORTING
P_RETVAL = W_ITPO4-WTKG.
TOTWT1 = W_ITPO4-WTKG * W_ITPO4-MENGE.
IF W_ITPO4-BWART = '261'.
W_ITPO5-I_QTY = W_ITPO5-I_QTY + TOTWT1.
ELSEIF W_ITPO4-BWART = '101' OR W_ITPO4-BWART = '531'.
W_ITPO5-I_QTY = W_ITPO5-I_QTY - TOTWT1.
ENDIF.
ENDLOOP.
MODIFY T_ITPO5 INDEX SY-TABIX FROM W_ITPO5.
MODIFY T_ITPO5 FROM W_ITPO5 TRANSPORTING AUFNR.
ENDLOOP.
WRITE: / 'PRD.NO ITEM DESCRIPTION WIP(KGS)'.
ULINE.
LOOP AT T_ITPO5 INTO W_ITPO5.
READ TABLE T_ITPO1 INTO W_ITPO1 WITH KEY AUFNR = W_ITPO5-AUFNR.
SELECT SINGLE MAKTG FROM MAKT INTO W_ITPO5-ITEMDESC WHERE MATNR = W_ITPO1-MATNR.
if sy-subrc = 0 .
WRITE: / W_ITPO5-AUFNR,W_ITPO5-ITEMDESC,W_ITPO5-I_QTY.
TOT_QTY = TOT_QTY + W_ITPO5-I_QTY.
else.
write 'Unsuccessful'.
endif.
ENDLOOP.
ULINE.
FORMAT COLOR 3.
WRITE: / 'GTOTAL',55 TOT_QTY.
FORMAT COLOR OFF.
I want to have output that the production order is displayed along with the deficit quantity. but using this concept it shows only production order no. and qty 0. -
Error while accessing safety measures
Hello,
While accessing the Safety Measures from Work Area work bench, getting following error:
Internal program error; (SAPLCBIH_AC03 SAPLCBIH_WA00 ERROR_TABSTRIP_INIT MISSING_ACCAT)
Message no. C$153
Diagnosis
Internal system error
Procedure
Notify your system administrator.
Error data
SAPLCBIH_AC03
SAPLCBIH_WA00
ERROR_TABSTRIP_INIT
MISSING_ACCAT
I am working on EHS in ERP 2005 (No support pack) system.
I have done the settings mentioned in the SAP note: 1042993 and 362196.
Authorization check is coming clear in SU53.
Does anyone have any idea about this error?
Regards,
NirajHello Keshav,
Thanks for the reply.
But the issue was not related to the status.
System was giving this error because there were no customizing settings were done for Safety Measures.
As soon as I maintained the customizing settings for the safety measures, I found no errors.
Regards,
Niraj -
How to find workarea ID for the work area name.
Hi Experts..
How to find workarea ID for the work area name.(Work area name CCIHT_WAH-WAID and I want to fetch characteristic data from table AUSP matching the OBJEK field,but I only have Work area name).Can anybody help me to find tables or relationship between Workarea ID and Workarea name for the same.I am using TCODE - CHIB02.Once I select a workarea and click on IHS Data button,I get data for that workarea.I need to find where this data comes from and How is this fetched.
Points would be rewarded for helpful answers..
Thanks
Kunal HalarnakarU want to fetch the workarea description ?
we can fetch it from CCIHT_WALD table with the RECN value.
The informations are stored in AUSP table with the characterstic(ATINN) value. -
How to create an EHS Work Area on Company Code level?
Hi,
Is it possible to create work area on company level?
(In CBIH02 the EHS work area can only be created within a Plant)
I had a look at the following transactions related to link a work area to Organization Management, I'm really
confused and have no idea how to realize it.
Path: EHS > Industrial Hygiene and Safety > Work Area > Link to Organizational Mangement
PPSC - Create Structures
PPSM - Edit Structures
PPME - Edit Matrixes
Help is much appreciated.
Roy DerksHi Roy,
I doubt on Company Level. As work Area's standard hierarchy goes like that - Work Area -- Plant -- Location -- Production Process -- Activity -- Machine -- Task.
I would revert back if I could get something.
Regards,
Akash -
SOME FIELDS OF WORK AREA ARE CONVERTED TO ***** AT AT NEW STATEMENT
HELLO
SOME OF THE FIELDS OF WORK AREA ARE CONVERTED INTO *********** AT AT NEW STATEMENT .FIND BELOW THE CODE
*& Report YTEST_OBJECTS7
REPORT YTEST_OBJECTS7.
Program Description
Author.........: Jitendra Dash *
Creation date..: 17/09/2010 *
GAP ID/FS Id...: *
Transport......: *
Description u2026..: *
CHANGE HISTORY u2013 Should be completed in reverse date order *
Revised by........: <Developer name> *
Change date.......: Date of creation> *
CR/Defect No......: <Change Request No>/ <Defect#<xxx> *
Transport.........: <Request No> *
Description.......: Description about modification *
Data Declaration
TYPES: BEGIN OF gx_input,
NEMI TYPE EXT_UI,
DIVISION TYPE SPARTE ,
DATE TYPE ERDAT,
DATE1 TYPE ERDAT,
END OF gx_input.
TYPES: BEGIN OF gx_input1,
NEMI TYPE EXT_UI,
DIVISION TYPE SPARTE ,
DATE TYPE ERDAT,
DATE1 TYPE ERDAT,
int_ui TYPE INT_UI,
ANlage type anlage,
SERVICE TYPE SERCODE,
SERVICEID TYPE SERVICE_PROV,
SPARTE TYPE SPARTE,
END OF gx_input1.
TYPES : BEGIN OF gx_euitrans,
INT_UI TYPE INT_UI,
EXT_UI type EXT_UI,
END OF gx_euitrans.
TYPES : BEGIN OF gx_eservice,
INT_UI TYPE INT_UI,
SERVICE TYPE SERCODE,
SERVICEID TYPE SERVICE_PROV,
SPARTE TYPE SPARTE,
END OF gx_eservice.
TYPES : BEGIN OF gx_inst,
int_ui TYPE INT_UI,
ANlage type anlage,
END OF gx_inst.
TYPES : BEGIN OF gx_ever,
ANLAGE TYPE anlage,
EINZDAT TYPE EINZDAT,
AUSZDAT TYPE AUSZDAT,
VERTRAG type VERTRAG,
vkonto TYPE VKONT_KK,
END OF gx_ever .
TYPES : BEGIN OF gx_fkkvkp,
VKONT type VKONT_KK,
GPART type GPART_KK,
END OF gx_fkkvkp.
DATA : GIT_INPUT TYPE STANDARD TABLE OF GX_INPUT,
git_euitrans TYPE STANDARD TABLE OF gx_euitrans,
git_eservice TYPE STANDARD TABLE OF gx_eservice,
git_inst TYPE STANDARD TABLE OF gx_inst,
git_ever TYPE STANDARD TABLE OF gx_ever,
GIT_INPUT1 TYPE STANDARD TABLE OF GX_INPUT1,
GIT_fkkvkp TYPE STANDARD TABLE OF GX_fkkvkp,
WA_INPUT TYPE gx_input,
wa_euitrans LIKE LINE OF git_euitrans,
wa_eservice like LINE OF git_eservice,
WA_inst LIKE LINE OF git_inst,
wa_ever LIKE LINE OF git_ever,
wa_INPUT1 like LINE OF git_INPUT1,
wa_fkkvkp like LINE OF GIT_fkkvkp.
DATA: gv_v_localfile TYPE localfile,
gv_g_localfile type string,
gv_g_alocalfile type string,
gv_g_sender type SERVICE_PROV,
gv_g_reciever type SERVICE_PROV.
CONSTANTS : GC_AINP TYPE c LENGTH 50 VALUE '/tmp'.
************Selection screen for input *********************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE t1.
PARAMETERS : p_rad1 RADIOBUTTON GROUP grp DEFAULT 'X' USER-COMMAND chk,
p_rad2 RADIOBUTTON GROUP grp,
p_file TYPE file_table-filename MODIF ID m1,
p_afile TYPE file_table-filename MODIF ID m2.
SELECTION-SCREEN END OF BLOCK b1.
***************Initialization*****************************
INITIALIZATION.
t1 = text-001.
***Selection of Appl ser and Presen ser for I/P file******
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_rad1 = 'X'.
IF screen-group1 = 'M2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ELSEIF p_rad2 = 'X'.
IF screen-group1 = 'M1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
**F4 help for inputting the Filename from presentation Ser*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = sy-repid
dynpro_number = sy-dynnr
field_name = p_file
CHANGING
file_name = gv_v_localfile
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
IF sy-subrc = 0.
MOVE gv_v_localfile TO p_file.
move gv_v_localfile to gv_g_localfile.
ENDIF.
***F4 help for file on Application Server*******************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_afile.
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = GC_AINP
filemask = ' '
IMPORTING
serverfile = p_afile
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc = 0.
move p_afile to gv_g_alocalfile.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
START-OF-SELECTION.
IF p_rad1 = 'X'.
*************Upload file into Itab from pres server*********
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = gv_g_localfile
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '|'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = GIT_INPUT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSEIF p_rad2 = 'X'.
*************Upload file into Itab from Applic server*********
************file should be ; seperated and not tab seper******
TRANSLATE gv_g_alocalfile USING '\/'.
OPEN DATASET gv_g_alocalfile FOR INPUT MESSAGE gv_LC_MESSAGE in TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
DO.
READ DATASET gv_g_alocalfile INTO wa_xls.
IF sy-subrc IS NOT INITIAL.
EXIT.
ELSE.
APPEND wa_xls TO git_xls.
ENDIF.
ENDDO.
ENDIF.
close DATASET gv_g_alocalfile.
ENDIF.
SELECT INT_UI EXT_UI from EUITRANS
into CORRESPONDING FIELDS OF TABLE git_euitrans
for ALL ENTRIES IN GIT_INPUT
WHERE ext_ui = GIT_INPUT-NEMI.
SElect INT_UI
SERVICE
SERVICEID
SPARTE from ESERVICE
into CORRESPONDING FIELDS OF TABLE git_eservice
FOR ALL ENTRIES IN git_euitrans
where INT_UI = git_euitrans-INT_UI .
SELECT INT_UI
ANLAGE from euiinstln
into CORRESPONDING FIELDS OF TABLE GIT_INST
FOR ALL ENTRIES IN git_eservice
WHERE INT_UI = git_eservice-INT_UI.
LOOP AT git_eservice into wa_eservice.
READ TABLE git_euitrans into wa_euitrans
with KEY int_ui = wa_eservice-int_ui.
IF SY-SUBRC = 0.
READ TABLE git_input into wa_input
WITH key NEMI = wa_euitrans-EXT_UI.
IF SY-SUBRC = 0.
READ TABLE GIT_INST into WA_INST
with key int_ui = wa_eservice-int_ui.
IF Sy-subrc = 0.
wa_input1-NEMI = wa_input-NEMI .
wa_input1-DIVISION = wa_input-DIVISION.
wa_input1-DATE = wa_input-DATE.
wa_input1-DATE1 = wa_input-DATE1.
wa_input1-int_ui = wa_eservice-int_ui.
wa_input1-anlage = WA_INST-anlage.
wa_input1-SERVICE = wa_eservice-service.
wa_input1-SERVICEID = wa_eservice-serviceid.
wa_input1-SPARTE = wa_eservice-sparte.
Append wa_input1 to git_input1.
ENDIF.
ENDIF.
ENDIF.
clear : wa_eservice,wa_input,WA_INST,wa_euitrans,wa_input1 .
ENDLOOP.
SELECT anlage
EINZDAT
AUSZDAT
VERTRAG
VKONTO from ever
into CORRESPONDING FIELDS OF TABLE git_ever
FOR ALL ENTRIES IN git_input1
WHERE anlage = git_input1-ANLAGE
and EINZDAT = git_input1-DATE
or AUSZDAT = git_input1-DATE1.
Select Vkont Gpart from fkkvkp
into CORRESPONDING FIELDS OF TABLE git_fkkvkp
for ALL ENTRIES IN git_ever
where Vkont = git_ever-Vkonto.
LOOP AT git_input1 INTO wa_input1 .
IF wa_input1-SPARTE = 01 .
CASE wa_input1-SERVICE.
WHEN 'FRMP'.
gv_g_sender = wa_input1-SERVICEID.
WHEN 'LNSP'.
gv_g_reciever = wa_input1-SERVICEID.
ENDCASE.
ELSEIF wa_input1-SPARTE = 02 .
CASE wa_input1-SERVICE.
WHEN 'FRO'.
gv_g_sender = wa_input1-SERVICEID.
WHEN 'DB'.
gv_g_reciever = wa_input1-SERVICEID.
ENDCASE.
ENDIF.
data : int_ui TYPE INT_UI.
*int_ui = wa_input1-int_ui .
AT NEW int_ui .
READ TABLE git_ever into wa_ever with key anlage = wa_input1-anlage.
READ TABLE git_fkkvkp INTO wa_fkkvkp with key Vkont = wa_ever-Vkonto.
CALL FUNCTION 'ZIN_COMEV_CUSTDETAILNOTIF_OUT'
EXPORTING
Y_SENDER = gv_g_sender
Y_RECEIVER = gv_g_reciever
Y_PARTNER = wa_fkkvkp-gpart
Y_BASIC_PROCESS = 'ZCDNO'
Y_SWITCHNUM =
Y_SEN_LOAD =
Y_INTUI = wa_input1-int_ui
Y_TRANSACTIONID =
Y_DATE = wa_input1-DATE
IMPORTING
X_TASK_ID =
TABLES
IDOC_STATUS =
IDOC_CONTRL =
XYT_ERROR =
EXCEPTIONS
GENERAL_FAULT = 1
NOT_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDAT.
ENDLOOP.
IN THIS PROGRAM AT AT NEW STATEMENT IN LOOP SOME OF THE FIELDS OF wa_input1 IS CONVERTED TO ***** E.G wa_input1-anlage.
pLEASE HELP ME OUTHELLO
My Q is some fields at AT NEW statement turns into *****.Please help me out
TYPES: BEGIN OF gx_input1,
NEMI TYPE EXT_UI,
DIVISION TYPE SPARTE ,
DATE TYPE ERDAT,
DATE1 TYPE ERDAT,
int_ui TYPE INT_UI,
ANlage type anlage,
SERVICE TYPE SERCODE,
SERVICEID TYPE SERVICE_PROV,
SPARTE TYPE SPARTE,
END OF gx_input1.
GIT_INPUT1 TYPE gx_input1.
LOOP AT git_input1 INTO wa_input1 .
AT NEW int_ui .----
>hERE FIELDS OF wa_input1 ARE TURNED INTO *
EX: wa_input1-ANLAGE =******** AFTER AT IN COMMAND.
END AT
eNDLOOP -
Item & for schedule line & is in the work area
Hi All,
We added some custom fields on the schedule line tab and also in VBEP table. For thie same we also added code in the PBO module of SAPMV45A/4500 screen#. Since we added the code we are getting the error message# V1357 with description 'Item 000010 for schedule line 000040 is in the work area'.
I did check the forum and found couple of notes with this error and some replies say that it is for the quality issue. I tried going to OQ77. But i am pretty sure it is because of what i codded. Because When i comment my code so error shows up. But I am not sure what is the problem with my code.
Here is the sample of my code that i wrote in my PBO module:
IF XVBEP-VBELN IS NOT INITIAL.
INPUT = MARA-BRGEW * XVBEP-WMENG.
PERFORM CONVERSION. "This is the module that i wrote to convert from G to LB.
XVBEP-ZTOTALWT = OUTPUT.
xvbep-updkz = 'U'.
modify xvbep index ivbep-tabix.
ENDIF.
Please let me know if i am doing wrong anywhere in the code.
Thanks,
Karuna.Issue: I got the issue resolved. The mistake i made was the local structure was holding last item which has 1 schedule line and the my first item10 was having more than 1 schedule lines and trying to loop all the schedule lines. As the last item has only one schedule line i was getting the problem.
Solution: I reset the structure to that it will loop from the first line item instead of it holding the last item#.
Hope this helps.
Karuna -
Hi,
When i am creating an work area the below mentioned error is coming after entering all relevant details like work area type , authorization group etc...
error :
You have not specified an object key
Message no. D9364
please help
regards,
madhu kiranDear Madu Kiran,
Ensure you have the below settings in your system.
1) Number ranges
0I > 00000000000000000001 89999999999999999999
0E A ZZZZZZZZZZZZZZZZZZZZ X
2) User exits
Environment, Health & Safety> Basic Data and Tools> Basic Settings> Manage User Exits
UExit Cat > UExit name > Function module name
WKA_EPIDR > EPI_DEREF > CBIH_WA05_ENTRY_DEL_REF
WKA_QUERY > WKA_EXP > CBIH_WA15_WA_FIND_BY_EXP
WKA_QUERY > WKA_HEAD > CBIH_WA15_WA_FIND_BY_HEAD
WKA_QUERY > WKA_IOJ > CBIH_WA15_WA_FIND_BY_INFO
WKA_SCATCH > WAHID > CBIH_LB10_WAID_CHECK
IHS_COPY > WKA_COPY > CBIH_WA16_ENTRY
IHS_ENTRY > WKA_ENTRY > CBIH_WA00_ENTRY
IHS_WAHEAD > WKA_HEADER > CBIH_WA03_ENTRY
IHS_WANAM > WANAM_HELP > CBIH_LB10_WANAM_HLP
and also follow the IMG documentation to check other user exits related to work area.
3) Status profiles:
Environment, Health & Safety> Industrial Hygiene and Safety> Basic Settings Status management> Activate Status Profiles
Ensure all are active
Typ > OTy > StatProf > ASP
WKA > E5 > EHS_WKA1 > u221A
ACH > F1 > EHS_ACH1 > u221A
ERI > E6 > EHS_ERI1 > u221A
FAL > E7 >EHS_FAL1 > u221A
IAL > E8 > EHS_IAL1 > u221A
IAP > E9 > EHS_IAP1 > u221A
QTY> F3 > EHS_QTY1 > u221A
SUB> E1 > EHS_SUB1 > u221A
Let me know if problem still persists
Regards,
Srinivas Nookireddy -
Basic query regarding work-area and select query
hi
dear sdn members,
thanks too all for solving all my query's up till now
i am stuck in a problem need help
1) why basically work-area has been used ? the sole purpose
2) different types of select query ? only coding examples
note: no links pls
regards,
virushi,
Work Area
Description for a data object that is particularly useful when working with internal tables or database tables as a source for changing operations or a target for reading operations.
WORKAREA is a structure that can hold only one record at a time. It is a collection of fields. We use workarea as we cannot directly read from a table. In order to interact with a table we need workarea. When a Select Statement is executed on a table then the first record is read and put into the header of the table and from there put into the header or the workarea(of the same structure as that of the table)of the internal table and then transferred top the body of the internal table or directly displayed from the workarea.
Each row in a table is a record and each column is a field.
While adding or retrieving records to / from internal table we have to keep the record temporarily.
The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
.g.
data: begin of itab occurs 10,
ab type c,
cd type i,
end of itab. " this table will have the header line.
data: wa_itab like itab. " explicit work area for itab
data: itab1 like itab occurs 10. " table is without header line.
The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table.
With header line
SELECT.
Put the curson on that word and press F1 . You can see the whole documentation for select statements.
select statements :
SELECT result
FROM source
INTO|APPENDING target
[[FOR ALL ENTRIES IN itab] WHERE sql_cond]
Effect
SELECT is an Open-SQL-statement for reading data from one or several database tables into data objects.
The select statement reads a result set (whose structure is determined in result ) from the database tables specified in source, and assigns the data from the result set to the data objects specified in target. You can restrict the result set using the WHERE addition. The addition GROUP BY compresses several database rows into a single row of the result set. The addition HAVING restricts the compressed rows. The addition ORDER BY sorts the result set.
The data objects specified in target must match the result set result. This means that the result set is either assigned to the data objects in one step, or by row, or by packets of rows. In the second and third case, the SELECT statement opens a loop, which which must be closed using ENDSELECT. For every loop pass, the SELECT-statement assigns a row or a packet of rows to the data objects specified in target. If the last row was assigned or if the result set is empty, then SELECT branches to ENDSELECT . A database cursor is opened implicitly to process a SELECT-loop, and is closed again when the loop is ended. You can end the loop using the statements from section leave loops.
Up to the INTO resp. APPENDING addition, the entries in the SELECTstatement define which data should be read by the database in which form. This requirement is translated in the database interface for the database system´s programming interface and is then passed to the database system. The data are read in packets by the database and are transported to the application server by the database server. On the application server, the data are transferred to the ABAP program´s data objects in accordance with the data specified in the INTO and APPENDING additions.
System Fields
The SELECT statement sets the values of the system fields sy-subrc and sy-dbcnt.
sy-subrc Relevance
0 The SELECT statement sets sy-subrc to 0 for every pass by value to an ABAP data object. The ENDSELECT statement sets sy-subrc to 0 if at least one row was transferred in the SELECT loop.
4 The SELECT statement sets sy-subrc to 4 if the result set is empty, that is, if no data was found in the database.
8 The SELECT statement sets sy-subrc to 8 if the FOR UPDATE addition is used in result, without the primary key being specified fully after WHERE.
After every value that is transferred to an ABAP data object, the SELECT statement sets sy-dbcnt to the number of rows that were transferred. If the result set is empty, sy-dbcnt is set to 0.
Notes
Outside classes, you do not need to specify the target area with INTO or APPENDING if a single database table or a single view is specified statically after FROM, and a table work area dbtab was declared with the TABLES statement for the corresponding database table or view. In this case, the system supplements the SELECT-statement implicitly with the addition INTO dbtab.
Although the WHERE-condition is optional, you should always specify it for performance reasons, and the result set should not be restricted on the application server.
SELECT-loops can be nested. For performance reasons, you should check whether a join or a sub-query would be more effective.
Within a SELECT-loop you cannot execute any statements that lead to a database commit and consequently cause the corresponding database cursor to close.
SELECT - result
Syntax
... lines columns ... .
Effect
The data in result defines whether the resulting set consists of multiple rows (table-like structure) or a single row ( flat structure). It specifies the columns to be read and defines their names in the resulting set. Note that column names from the database table can be changed. For single columns, aggregate expressions can be used to specify aggregates. Identical rows in the resulting set can be excluded, and individual rows can be protected from parallel changes by another program.
The data in result consists of data for the rows lines and for the columns columns.
SELECT - lines
Syntax
... { SINGLE }
| { { } } ... .
Alternatives:
1. ... SINGLE
2. ... { }
Effect
The data in lines specifies that the resulting set has either multiple lines or a single line.
Alternative 1
... SINGLE
Effect
If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set. The data objects specified after INTO may not be internal tables, and the APPENDING addition may not be used.
An exclusive lock can be set for this line using the FOR UPDATE addition when a single line is being read with SINGLE. The SELECT command is used in this case only if all primary key fields in logical expressions linked by AND are checked to make sure they are the same in the WHERE condition. Otherwise, the resulting set is empty and sy-subrc is set to 8. If the lock causes a deadlock, an exception occurs. If the FOR UPDATE addition is used, the SELECT command circumvents SAP buffering.
Note
When SINGLE is being specified, the lines to be read should be clearly specified in the WHERE condition, for the sake of efficiency. When the data is read from a database table, the system does this by specifying comparison values for the primary key.
Alternative 2
Effect
If SINGLE is not specified and if columns does not contain only aggregate expressions, the resulting set has multiple lines. All database lines that are selected by the remaining additions of the SELECT command are included in the resulting list. If the ORDER BY addition is not used, the order of the lines in the resulting list is not defined and, if the same SELECT command is executed multiple times, the order may be different each time. A data object specified after INTO can be an internal table and the APPENDING addition can be used. If no internal table is specified after INTO or APPENDING, the SELECT command triggers a loop that has to be closed using ENDSELECT.
If multiple lines are read without SINGLE, the DISTINCT addition can be used to exclude duplicate lines from the resulting list. If DISTINCT is used, the SELECT command circumvents SAP buffering. DISTINCT cannot be used in the following situations:
If a column specified in columns has the type STRING, RAWSTRING, LCHAR or LRAW
If the system tries to access pool or cluster tables and single columns are specified in columns.
Note
When specifying DISTINCT, note that you have to carry out sort operations in the database system for this.
SELECT - columns
Syntax
| { {col1|aggregate( col1 )}
{col2|aggregate( col2 )} ... }
| (column_syntax) ... .
Alternatives:
1. ... *
2. ... {col1|aggregate( col1 )}
{col2|aggregate( col2 )} ...
3. ... (column_syntax)
Effect
The input in columns determines which columns are used to build the resulting set.
Alternative 1
Effect
If * is specified, the resulting set is built based on all columns in the database tables or views specified after FROM, in the order given there. The columns in the resulting set take on the name and data type from the database tables or views. Only one data object can be specified after INTO.
Note
If multiple database tables are specified after FROM, you cannot prevent multiple columns from getting the same name when you specify *.
Alternative 2
... {col1|aggregate( col1 )}
{col2|aggregate( col2 )} ...
Effect
A list of column labels col1 col2 ... is specified in order to build the resulting list from individual columns. An individual column can be specified directly or as an argument of an aggregate function aggregate. The order in which the column labels are specified is up to you and defines the order of the columns in the resulting list. Only if a column of the type LCHAR or LRAW is listed does the corresponding length field also have to be specified directly before it. An individual column can be specified multiple times.
The addition AS can be used to define an alternative column name a1 a2 ... with a maximum of fourteen digits in the resulting set for every column label col1 col2 .... The system uses the alternative column name in the additions INTO|APPENDING CORRESPONDING FIELDS and ORDER BY. .
Column labels
The following column labels are possible:
If only a single database table or a single view is specified after FROM, the column labels in the database table - that is, the names of the components comp1 comp2... - can be specified directly for col1 col2 ... in the structure of the ABAP Dictionary.
If the name of the component occurs in multiple database tables of the FROM addition, but the desired database table or the view dbtab is only specified once after FROM, the names dbtab~comp1 dbtab~comp2 ... have to be specified for col1 col2 .... comp1 comp2 ... are the names of the components in the structure of the ABAP Dictionary.
If the desired database table or view occurs multiple times after FROM, the names tabalias~comp1 tabalias~comp2 ... have to be specified for col1 col2 .... tabalias is the alternative table name of the database table or view defined after FROM, and comp1 comp2 ... are the names of the components in the structure of the ABAP Dictionary.
The data type of a single column in the resulting list is the datatype of the corresponding component in the ABAP Dictionary. The corresponding data object after INTO or APPENDING has to be selected accordingly.
Note
If multiple database tables are specified after FROM, you can use alternative names when specifying single columns to avoid having multiple columns with the same name.
Example
Read specific columns of a single row.
DATA wa TYPE spfli.
SELECT SINGLE carrid connid cityfrom cityto
INTO CORRESPONDING FIELDS OF wa
FROM spfli
WHERE carrid EQ 'LH' AND connid EQ '0400'.
IF sy-subrc EQ 0.
WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
ENDIF.
Alternative 3
... (column_syntax)
Effect
Instead of static data, a data object column_syntax in brackets can be specified, which, when the command is executed, either contains the syntax shown with the static data, or is initial. The data object column_syntax can be a character-type data object or an internal table with a character-type data type. The syntax in column_syntax, like in the ABAP editor, is not case-sensitive. When specifying an internal table, you can distribute the syntax over multiple rows.
If column_syntax is initial when the command is executed, columns is implicitly set to * and all columns are read.
If columns are specificied dynamically without the SINGLE addition, the resulting set is always regarded as having multiple rows.
Notes
Before Release 6.10, you could only specify an internal table with a flat character-type row type for column_syntax with a maximum of 72 characters. Also, before Release 6.10, if you used the DISTINCT addition for dynamic access to pool tables or cluster tables, this was ignored, but since release 6.10, this causes a known exception.
If column_syntax is an internal table with header line, the table body and not the header line is evaluated.
Example
Read out how many flights go to and from a city. The SELECT command is implemented only once in a sub-program. The column data, including aggregate function and the data after GROUP BY, is dynamic. Instead of adding the column data to an internal l_columns table, you could just as easily concatenate it in a character-type l_columns field.
PERFORM my_select USING `CITYFROM`.
ULINE.
PERFORM my_select USING `CITYTO`.
FORM my_select USING l_group TYPE string.
DATA: l_columns TYPE TABLE OF string,
l_container TYPE string,
l_count TYPE i.
APPEND l_group TO l_columns.
APPEND `count( * )` TO l_columns.
SELECT (l_columns)
FROM spfli
INTO (l_container, l_count)
GROUP BY (l_group).
WRITE: / l_count, l_container.
ENDSELECT.
ENDFORM.
SELECT - aggregate
Syntax
... { MAX( col )
| MIN( col )
| AVG( col )
| SUM( col )
| COUNT( DISTINCT col )
| COUNT( * )
| count(*) } ... .
Effect
As many of the specified column labels as you like can be listed in the SELECT command as arguments of the above aggregate expression. In aggregate expressions, a single value is calculated from the values of multiple rows in a column as follows (note that the addition DISTINCT excludes double values from the calculation):
MAX( col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
AVG( col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
COUNT( DISTINCT col ) Determines the number of different values in the column col in the resulting set or in the current group.
COUNT( * ) (or count(*)) Determines the number of rows in the resulting set or in the current group. No column label is specified in this case.
If you are using aggregate expressions, all column labels that are not listed as an argument of an aggregate function are listed after the addition GROUP BY. The aggregate functions evaluate the content of the groups defined by GROUP BY in the database system and transfer the result to the combined rows of the resulting set.
The data type of aggregate expressions with the function MAX, MIN or SUM is the data type of the corresponding column in the ABAP Dictionary. Aggregate expressions with the function AVG have the data type FLTP, and those with COUNT have the data type INT4. The corresponding data object after INTO or APPENDING has to be selected accordingly.
Note the following points when using aggregate expressions:
If the addition FOR ALL ENTRIES is used in front of WHERE, or if cluster or pool tables are listed after FROM, no other aggregate expressions apart from COUNT( * ) can be used.
Columns of the type STRING or RAWSTRING cannot be used with aggregate functions.
When aggregate expressions are used, the SELECT command makes it unnecessary to use SAP buffering.
Null values are not included in the calculation for the aggregate functions. The result is a null value only if all the rows in the column in question contain the null value.
If only aggregate expressions are used after SELECT, the results set has one row and the addition GROUP BY is not necessary. If a non-table type target area is specified after INTO, the command ENDSELECT cannot be used together with the addition SINGLE. If the aggregate expression count( * ) is not being used, an internal table can be specified after INTO, and the first row of this table is filled.
If aggregate functions are used without GROUP BY being specified at the same time, the resulting set also contains a row if no data is found in the database. If count( * ) is used, the column in question contains the value 0. The columns in the other aggregate functions contain initial values. This row is assigned to the data object specified after INTO, and unless count( * ) is being used exclusively, sy-subrc is set to 0 and sy-dbcnt is set to 1. If count( *) is used exclusively, the addition INTO can be omitted and if no data can be found in the database, sy-subrc is set to 4 and sy-dbcnt is set to 0.
if helpful reward points -
How to create dynamic strcture and accepting runtime value in work area
Hi,
I am using RFC_READ_TABLE for joining more than table and written select query but into clause work area value is passed but it is short dump is displaying with too few many fields in into clause .work area WA need some casting type conversion which accepts the some run time value and should have some structure for it.how to create dynamic structure?hi
good
go through this and use in your report accordingly.
If you are trying to read some information from SAP and you can't find the right BAPI then RFC_READ_TABLE can do the job for you.
RFC_READ_TABLE is powerful RFC it gives you the access to all tables and views in SAP. I basically used RFC_READ_TABLE for Material Master Search application on the Intranet.
Now you may say there are lots of BAPI for this functionality. You are right but I had to work around the BAPI to get Prices (Moving Average Price) and it just did not work very well. Because of the nature of the application I had to use RFC_READ_TABLE because then I can use powerful SQL expression for searching. RFC_READ_TABLE give you the ability to code the where clause which is quite enough.
I have included part of the code use in asp page to read ENT1027 for Mgroup and M description & number but without object creation. The other part of the code reads MBEW for price & quantity.
Code
lt;%
'#######################Diming the Structures
Call BAPIRFC.DimAs("Rfc_Read_Table", "FIELDS", MaterialSelection_RS)
Call BAPIRFC.DimAs("Rfc_Read_Table", "OPTIONS", Selection_RS)
'########################Search Type########################
' C contanis
' S Start with
' E Ends with
if searchtype = "C" then
FormatedSearch_Keyword = "%" & Search_Keyword & "%"
elseif searchtype = "S" then
FormatedSearch_Keyword = Search_Keyword & "%"
else searchtype = "E" then
FormatedSearch_Keyword = "%" & Search_Keyword
end if
'################# Flaged for deletion Materials #####################
if showdeleted = "No" then
Selection_RS.AddNew Array("TEXT"),Array("LVORM <> 'X' AND")
end if
'############## users can search three material group ################
'############## GROUPS: OFFICESUP TECOMHARD TECOMSOFT ###############
'##USER STILL CAN NAROW THEIR SEARCH BY SELECTING ON OF THREE#########
if MGroup = "ALL" then
Selection_RS.AddNew Array("TEXT"),Array("MATKL IN ('OFFICESUP','TECOMHARD','TECOMSOFT')")
else
Selection_RS.AddNew Array("TEXT"),Array("MATKL = '"& MGroup &"' and ")
end if
'#######################ADDING SEARCH KEYWORD TO STRUCTURE##############
if not Search_Keyword = "" then
Selection_RS.AddNew Array("TEXT"),Array(" MAKTG LIKE '" & FormatedSearch_Keyword & "'")
end if
Selection_RS.Update
'#######################ADD RETURNED FIELDS#########################
MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MATNR","000000","000000" ,"","")
MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MATKL","000000","000000" ,"","")
MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MAKTG","000000","000000" ,"","")
MaterialSelection_RS.Update
call BAPIRFC.Rfc_Read_Table("ENT1027", Material_RS, MaterialSelection_RS, Selection_RS, "~", "", "0", "0")
If Err.Number > 0 then
Response.Write "Error:" & "<BR>"
Response.Write " Err.number...... " & Err.Number & "<BR>"
Response.Write " Err.Description. " & Err.Description & "<BR>"
end if
'###########LOOP THROUGH RECORDSET
if not Material_RS is nothing then
do while not Material_RS.eof
loop
end if
%>
thanks
mrutyun^ -
Is the iphone explosion proof, so you can use it in hazardous work areas?
I wish to use my iphone 4 for work. I work in the oil industry and its classed as a hazardous work area. Can you use the iphone in these types of areas?
Although many users want to use iPhones, iPods and iPads in the workplace there are very real limits to it's usefulness and in your case safety.
There are many devices with ISafe or Intrisnically Safe ratings as well as HazLoc or Hazardous Locations ratings. The use of electronic devices in the petro-chemical industry is well regulated. You facilities or safety manager will tell you what devices are allowed and where. Generally when someone asks if a device is explosion proof they are not actually looking for explosion proof but hazloc. How often are you entering an area with explosive gasses under pressure or in a configned space with potential explosive gasses?
Use the right tool for the job, and in your area of work there is no Apple product that will meet even the weakest standards for safety.
Be careful, your job or your life and the lives of others is on the line! -
Hi Christoph ,
I appreciate your effort for this
While using t-code: CBIH02 : In Restricting criteria for work Area Selection tab
We have one field: Status having f drop down : Active, Inactive,
I want to add two more values there. So where i can add more values in drop down at configuration level.
So kindly provide guide lines to complete this task.
Regards,
SHarmaDear Rohan
You can extend the status networks for some object types by adding enterprise-specific statuses. To do this, you insert astatus profile into the relevant status network in Customizing for Industrial Hygiene and Safety. This status profile contains a sequence of user statuses that you defined.
Balajee
Maybe you are looking for
-
Missing JavaDoc in JDev 10.1.3 ?
When selecting oracle.sql.BLOB and browsing the javadoc the url is http://java.sun..com/j2ee/docs/api/oracle/sql/BLOB.html This is obviously wrong (no documentation is returned) What is the correct url for this javadoc ? I am using JDev 10.1.3 stusio
-
Add a deprovisioning during an ongoing one
Hi, all! Here's my problem. I have to deprovision one account when some other account is being deprovisioned. Using groups and roles is not an option. I am trying my luck in "Delete User" workflow. When it's called it is given the variable options wh
-
Dear Friends, Can you please help me if you have any clue for my problem? I am trying to download Pricing table A616 from R3. In R3 A616 table we have 45000 entries. Object has been created at transaction R3AC5 - Condition Objects and triggered this
-
CUIS Archiver reporting environment error..
When I point the datasource to the AWDB the report runs fine. However, When I point the report to Archiver_data it gives me environment error. I noticed that there are few views missing in the archiver_data database in compate to AWDB database. Eg Ag
-
Finder Disappears When Plugging in iPod
I have an 80GB iPod Classic and everytime I plug into a computer (i've tried a few) it causes the finder to disappear. It still mounts in iTunes and I can add and delete songs but I can't access any of the files I have saved on it. I've tried disk ut