Skip to Content
0

Custom Screen Attach Document like Standard Purchase Order Attachment(GOS)

Dec 09, 2016 at 09:36 AM

89

avatar image

Need Small information.
My Requirement is i need to Attach and view the Documents from Desktop Like Standard Purchase order attach documents.

By using the class , i was created two menus and completed the task.

manager TYPE REF TO cl_gos_manager,

CALL METHOD manager->start_service_direct
EXPORTING
ip_service = 'PCATTA_CREA'
is_object = obj
EXCEPTIONS
no_object = 1
object_invalid = 2
execution_failed = 3
OTHERS = 4.
ENDIF.

IF ok_code EQ 'DISPLAY'.

CREATE OBJECT manager
EXPORTING
ip_no_commit = 'R'
EXCEPTIONS
others = 1.

obj-objtype = 'ZGOSUPLOAD'.
obj-objkey = t_docno.

CALL METHOD manager->start_service_direct
EXPORTING
ip_service = 'VIEW_ATTA'
is_object = obj
EXCEPTIONS
no_object = 1
object_invalid = 2
execution_failed = 3
OTHERS = 4.
ENDIF.

In the above obj means ,Module pool is generating one unique document number for every document,I need to pass that document number.

Presently i am attaching the files only in module pol change mode only.So, In change mode i am getting the module pool zscreen unique number,So, No problem.

My problem is. How could i do the same operation at creation mode. Because there is no number is generating at Creation mode(While saving only i can get the document no), How could i provide the Document number to above obj class.

Any suggestion please update me.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Dec 09, 2016 at 09:52 AM
1

Work in the transaction with some dummy number (like some of the standard application who generates some temporary %0000001, %0000002 numbers) then at commit, transfer document from the dummy to the final one and delete dummy records.

But note that many standard creation transactions only allow attachment if some "early number assignment" is in use (so no temp. number requirement but gaps in number ranges)

Regards,
Raymond

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks for your reply.
1 Important point i have seen

In Change mode i was attached one document.I have not save the zscreen save button.
but this standard table SRGBTBREL is one record is adding.So i how could i implement the logic.

0

Which value of IP_NO_COMMIT did you pass when creating occurence of cl_gos_manager (look at domain SGS_CMODE values)

0