Shared Top Border

Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Home arrow Sample Code arrow ABAP Reports arrow Retrieving the views of the material master
Retrieving the views of the material master PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Anon.   
Friday, 02 March 2007
This program lists the views for a particular material. Table MOFF stores the views that have not yet been created for a particular material.

tables: mara,t134,t133a.

 

data: begin of bildtab occurs 30.

include structure mbildtab.

data: end of bildtab.

data: tkstatus(15),

dispstatus like t130m-pstat.

 

parameters: p_matnr like mara-matnr.

 

call function 'MATERIAL_INIT'

exporting

tcode = 'MM02'

kz_berprf = 'X'

importing

tkstatus = tkstatus

exceptions

no_authority = 01.

 

call function 'SELECTION_VIEWS_FIND'

exporting

bildsequenz = '21'

pflegestatus = tkstatus"mara-pstat

tables

bildtab = bildtab.

 

*select single * from mara where matnr = p_matnr.

call function 'MARA_SINGLE_READ'

exporting

matnr = p_matnr "material

importing

wmara = mara

exceptions

lock_on_material = 01

lock_system_error = 02

not_found = 03

others = 04.

 

call function 'MARA_DUMMY_STATUS'

exporting

wmara_in = mara

importing

wmara_out = mara

exceptions

call_wrong = 1

imara_error = 2

tmara_error = 3

others = 4.

 

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

 

select single * from t134 where mtart = mara-mtart.

 

call function 'ANZGSTATUS_SETZEN'

exporting

aktyp = 'V'

marastatus = mara-vpsta

t134status = t134-pstat

tkstatus = tkstatus "mara-pstat

importing

anzgstatus = dispstatus

tkbstatus = tkstatus.

 

translate dispstatus using ' $'.

 

loop at bildtab.

if bildtab-pstat ca dispstatus.

if bildtab-kzanz is initial.

bildtab-kzanz = 'X'.

modify bildtab.

endif.

else.

if not bildtab-kzanz is initial.

clear bildtab-kzanz.

modify bildtab.

endif.

endif.

endloop.

 


Related Items:

 
< Prev   Next >

Google Search

Google Ads

Shared Bottom Border

Contact Us | Polls | Add URL | Contribute | Privacy | Terms | Feedback

Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum
GenieHoldings.COM, Inc. | Genie Press | WorkflowGenie | ESAGenie | ERPTopSites | ABAP Tips and Tricks | SAP Solutions Database

EDIGenie | Searching Survivor