SAP for Oil, Gas, and Energy Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and navigate the evolving energy landscape. Join the conversation today!
cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module to create TSW-TICKET

Former Member
0 Kudos

Hi,

I was using FM 'OIJ_EL_A_TICKETS_MAINTAIN_N' to create a ticket, with the similar data by which I was actually able to create a ticket manually using O4TEN. The ticket is not actually created completely by this FM.

The FM is creating a record in tables OIJ_EL_TICKET_H and OIJ_EL_TICKET_I but the status and substatus values are "B"(Checked) and "4"(Positive), which is why the ticket is not create completely.

for the tickets which are created manually using O4TEN the status and substatus values are "C"(Planned) and "6" (Complete).

I checked the program for O4TEN in debug mode and found that after calling FM 'OIJ_EL_A_TICKETS_MAINTAIN_N' the program is calling other subroutines like "PERFORM generate_documents_for_ticket" "PERFORM ticket_enqueue" in the inclulde "MOIJTNF38" for document generation and others.

The program is using some additional methods in addition to 'OIJ_EL_A_TICKETS_MAINTAIN_N'.

If you have ever used a FM or a BAPI to create ticket which takes care of all these and creates a ticket completly, kindly let me know.

If you have any procedures(like the combination of a FM-'OIJ_EL_A_TICKETS_MAINTAIN_N' or BAPI with a BADI) Let me know.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try enquing the ticket using FM "ENQUEUE_E_OIJTKT" after the ticket is created by the FM OIJ_EL_A_TICKETS_MAINTAIN_N,

Call the FM OIJB_GENERATE_DOCUMENTS_N for the above created ticket with proper parameters and then DEQUEUE the ticket using FM DEQUEUE_E_OIJTKT.

This should generate the documents for the ticket.

Do let me know if it still doesnt work..

Best Regards

Vishnu

View solution in original post

4 REPLIES 4

Former Member
0 Kudos

Try enquing the ticket using FM "ENQUEUE_E_OIJTKT" after the ticket is created by the FM OIJ_EL_A_TICKETS_MAINTAIN_N,

Call the FM OIJB_GENERATE_DOCUMENTS_N for the above created ticket with proper parameters and then DEQUEUE the ticket using FM DEQUEUE_E_OIJTKT.

This should generate the documents for the ticket.

Do let me know if it still doesnt work..

Best Regards

Vishnu

0 Kudos

the cleanest way is to use IDOC_INPUT_OILTKT02.

It takes care of all that you have suggested in an encapsulated matter, and is SAP Standard as well.

Cheers!!

Harish

0 Kudos

Hi Harish,

Kindly share if you have some document to get populating of IDOC to create meter ticket for pipe and pump transfer.

Regards,

Kamal

jitendra_it
Active Contributor
0 Kudos

Hi KN Prasad ,

Has ur problem got solved ?

Please suggest me what u have done ? I also have similar requiremnt.