cancel
Showing results for 
Search instead for 
Did you mean: 

How to Release the specification in CG56

Former Member
0 Kudos
191

Hi,

I need a BAPI or FM to release the Specification in CG56 Tcode for EH&S data Specification, As my requirement is to do the release process in a report without any gaps.

I Will get the idoc and specification details in inbound idoc and store the same in custom table  using the exit. Using that i will run all the reviewed specification manually and relese using the report for all completed specifications. So in order to release the specification selected , we need a BAPi or FM .

SO kindly provide any BAPI or FM available.

Thanks in Advance

Best Regards,

Swethun

Accepted Solutions (0)

Answers (1)

Answers (1)

christoph_bergemann
Active Contributor
0 Kudos

Hello Swethun

using transction cg56 you release reports and not specifications. I DID NOT GET YOUR STORY "100%". Check may be:

BAPI_BUS1092_SAVREPMUL

This BAPI is used in ALE to "replicate" reports.

C.B.

Former Member
0 Kudos

Hi Christoph,

thanks for ur reply!!!

I am new to EHS, i dont know much about it, so sorry for less detailed info.Yeaa in cg56w we will release the reports, you are right.

I am going to release and also set the ststus to set historical . So i am trying to do it using the BAPI or FM. So i was looking for that.

Message type is SUBMAS and not REPMAS

So when i click on the set to historical button highlighted in screen shot, the status changes and also we do the same for release wen release is available. So i want this process to be done using the BAPI or FM . And also i knew that if already  the same two specification are in release status the previous entry will change to historical entry automatically. Will this be possible.

So i request for the BAPI and FM for above scenario ie., Relese and Set historical status change. Kindly help me on this.

Thanks,
Swethun

christoph_bergemann
Active Contributor
0 Kudos

Der Swethun

the story starts with the definition of the generation variant. If generation variant is set up so that new released report get "historical" if new report get released you need not to use any FMs etc

I am sorry. Never have had similar request . I do not know if there is really a special FM in place to be used

The BAPI provided is used for ALE traffic,

High level I assume this kind of logic:

a.) you have a list of specifications

b.) you do an e.g. upload/generation of reports (combination of gen var + language) (PAY ATTENTION: if we talk anout standard WWI: there is a chance that the report my be in status "generation with warning". You should not release it)

c.) then you would like to "release" them in one run

Now the "crucial" step is "c.)". Is there any user interaction needed? In most cases answer is yes: and therefore approach is different

C.B.

PS: any of the T codes (as CG56)  are more or less "CG50" special ones. Check may be: SAP ABAP Program SAPLC1G0 (EHS: Report Management - Initial Screen) - SAP Datasheet - The Best Onlin...

christoph_bergemann
Active Contributor
0 Kudos

Dear Swethun

one add on:

Message type is SUBMAS and not REPMAS


You may be "misinterpret" here the story. Let us assume this


You have two SAP systems. One for logistic purposes and one for EHS purposes.


To make available EHS data in logistic SAP system you must use these types:


PHRMAS (for phrases)

SUBMAS (for specifications)

REPMAS (for reports)

DOCMAS (for docuemnts as parts of the report)


If you miss one of these your target system will not work properly.


Check e.g. EH&S interface to distribute the specificat... | SCN


C.B.

Former Member
0 Kudos

Hi Christoph,

Thanks for the additional info, Can you also say what will be the BAPI / FM used to release or set to historical status of the completed report in CG56 for specification selected . It will be more helpful.

Thanks,

Swethun

christoph_bergemann
Active Contributor
0 Kudos

Dear Sewthun

never have had the need to drill down. E.g. CG50 is the "more" general transaction. I am not sure if there is really a FM etc. in place. The design here is "very user centric" (so must generate report tree etc.).

BAPI_BUS1092_SAVREPMUL might be a starting point. Never analyzed this "deeper". But story is like: you "mark" a number of specs and genvariant/language combinations to start ALE. may be you can use this to map from W6 (Status ready) to W7 (status released).

In any case. just analyse CG56 (or Cg50), It is more or less the story: you "mark" something and then you execute an action (e.g. release etc.). PAY attention. For the first version of report you need so specify the version (in most case 1.0). This is as well normalyl complety user driven

C.B.

Former Member
0 Kudos

Hi Christoph,

I analysed the CG50 Transaction through debugging the scenario from W6 to W7 status, as you said there is no BAPI used, SAP uses direct INSERT statement to DB tables.

But we cant use that INSERT command do it manually as standard does many validations and internal executions. So i thought of Going for BDC for CG50 Transaction.

Here too i face the problem that i am not able to get the line items in the property tree where to place the cursor when there are more line items.

In the below BDC recording you see the

BDC_CURSOR     08/66

BDC_OKCODE     =OACC

The 08/66 says the screen rows and columns, using this its cant be identified.

The recording code says:

    TCG50BS AA XX  F
1020X                                                                                                                                                                                                                                                                       
   BDC_OKCODE=PEXE
   BDC_SUBSCRSAPLC1G0                                8010REPORT_HEADER
   RCGRADMSEL-LANGU6N
   BDC_SUBSCRSAPLC1G0                                8020REPORT_STATE
   RCGRADMSEL-STATFLG3X
   BDC_SUBSCRSAPLC1G0                                8030GENERATION
   RCGRADMSEL-SBGVIDERD_CN
   RCGRADMSEL-GENDAT_FROM11.03.2014
   RCGRADMSEL-GENDAT_UNTIL11.03.2016
   BDC_SUBSCRSAPLC14TS                               8010APPLOBJ
   BDC_SUBSCRSAPLC1G0SUB                             8010TABSTRIP_SUBSCREEN
   BDC_CURSORRCGAPPLOBJ_SUBIOT-SUBID(01)
0120X                                                                                                                                                                                                                                                                       
   BDC_CURSOR08/66
   BDC_OKCODE=OACC
0120X                                                                                                                                                                                                                                                                       
   BDC_CURSOR08/66
   BDC_OKCODE=OSAV
0120X                                                                                                                                                                                                                                                                       
   BDC_CURSOR08/66
   BDC_OKCODE=GBCK

So is BDC posssible for CG50 transaction?

Thanks,
Swethun

christoph_bergemann
Active Contributor
0 Kudos

Dear Swethun

sorry. Batch input is not supported in EHS (therefore BDC: no option for EHS(  Check discussion here:

C.B.

Mark-Pfister
Active Contributor
0 Kudos

Hello Swethun,

The function module / API for Reports is: C1F3_REPORTS_UPDATE.
Like for the other EHS APIs you need to call C1F3_REPORTS_SAVE_TO_DB to make the changes persistent.

Hope this helps

Mark


P.s.: I do not understand your requirement completely:

If you set up ALE for reports between EHS System and a logistics system, they reports should should be in sync without any additional progrmaning.

christoph_bergemann
Active Contributor
0 Kudos

Dear Mark

thanks for giving/providing the FM

C.B.

christoph_bergemann
Active Contributor
0 Kudos

Dear Swethun

based on input of Mark: may be check:

ALE distribution of SDS - no set to "historical" | SCN

C.B.