Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with GENERATE DYNPRO

Former Member
0 Likes
1,823

Hi,

I have used IMPORT DYNPRO statement(SAP say's its for internal use) and fetched the screen values into an internal table....later I have sorted the fields in that internal table and did EXPORT DYNPRO and GENERATE DYNPRO.....with this all the fields got sorted and screen fields are wrongly functioning...could you please let me know how to revert it?

IMPORT DYNPRO ls_dynp_header lt_dynp_fields lt_dynp_logic  lt_dynp_matchc ID ls_dynproname.

SORT lt_dynp_fields BY fnam.

READ TABLE lt_dynp_fields ASSIGNING <fs_dynp_fields> WITH KEY fnam = lc_fldnam BINARY SEARCH.
IF sy-subrc = 0.
      IF im_v_readonly = 0.
        <fs_dynp_fields>-stxt = lc_save_proceed.
      ELSE.
        <fs_dynp_fields>-stxt = lc_proceed.
      ENDIF.
ENDIF.

EXPORT DYNPRO ls_dynp_header lt_dynp_fields lt_dynp_logic  lt_dynp_matchc ID ls_dynproname.

GENERATE DYNPRO ls_dynp_header lt_dynp_fields lt_dynp_logic  lt_dynp_matchc ID ls_dynproname
            MESSAGE ls_msg LINE ls_msg WORD ls_msg.

I hope because of the SORT statement, all the screen fields got disturbed.

I logged off and logged on but still facing the issue.

Please help.

Thanks & Regards,

Adithya M.

Hi,

I have used IMPORT DYNPRO statement(SAP say's its for internal use) and fetched the screen values into an internal table....later I have sorted the fields in that internal table and did EXPORT DYNPRO and GENERATE DYNPRO.....with this all the fields got sorted and screen fields are wrongly functioning...could you please let me know how to revert it?

IMPORT DYNPRO ls_dynp_header lt_dynp_fields lt_dynp_logic  lt_dynp_matchc ID ls_dynproname.

SORT lt_dynp_fields BY fnam.

READ TABLE lt_dynp_fields ASSIGNING <fs_dynp_fields> WITH KEY fnam = lc_fldnam BINARY SEARCH.
IF sy-subrc = 0.
      IF im_v_readonly = 0.
        <fs_dynp_fields>-stxt = lc_save_proceed.
      ELSE.
        <fs_dynp_fields>-stxt = lc_proceed.
      ENDIF.
ENDIF.

EXPORT DYNPRO ls_dynp_header lt_dynp_fields lt_dynp_logic  lt_dynp_matchc ID ls_dynproname.

GENERATE DYNPRO ls_dynp_header lt_dynp_fields lt_dynp_logic  lt_dynp_matchc ID ls_dynproname
            MESSAGE ls_msg LINE ls_msg WORD ls_msg.

I hope because of the SORT statement, all the screen fields got disturbed.

I logged off and logged on but still facing the issue.

Please help.

Thanks & Regards,

Adithya M.

7 REPLIES 7
Read only

Former Member
0 Likes
1,606

One approach is copying the error screen into new screen.

Is there any other way?

Read only

jcutinho
Explorer
0 Likes
1,606

I dont know if it will work, try to creating a copy of lt_dynp_fields and copy the same before sort and once you are done with the manipulation. Overwrite the lt_dynp_fields with the copied internal table.

Read only

Former Member
0 Likes
1,606

Hi Joel,

I don't have a copy of lt_dynp_fields before SORT available anywhere.

After SORT they got over-written.

I have copied the error screen into a new screen in the same program and used the new screen, now it is almost ok.

I have many table controls and text editors in my screen and these are working fine now after copying, except a push button text.

I changed the push button text manually and now everything is fine.

Thanks & Regards,

Adithya M.

Read only

Private_Member_7726
Active Contributor
0 Likes
1,606

Hi,

Can the screen be restored from version management?

cheers

Janis

Read only

0 Likes
1,606

Hi Janis,

I hope we can copy from other versions or other system(Q) if it is already moved to further systems.

In my case its a new development so no versions exist.

Thanks & Regards,

Adithya M.


Read only

0 Likes
1,605

Hi,

Normally a version exists in the "development database" once the workbench object is created using development tools. Unless the dynpro is deleted (before it was exported=version written to "version database"), this version should remain available. So what I meant with the question - does the export/generate dynpro writes the changes that need to be reverted to the (active) version in "development database" as well?

One can at any time "force" generation of a version in "version database". Here I have generated two versions of a local object that will never get transported:

Those versions remain available even after DELETE DYNPRO.

I like versions

cheers,
Janis

Read only

0 Likes
1,605

Hi Janis,

I didn't try, but I hope it will work.

Thanks,

Adithya M.